--- /usr/local/bin/package 2015-01-20 08:43:18.000000000 +0100 +++ /usr/local/bin/package 2015-01-20 09:05:20.000000000 +0100 @@ -44,7 +44,7 @@ SAVED_SERVICE="${SERVICE}" - if [ ${SERVICE} = "samba" ]; then + if [ $(echo ${SERVICE} | grep -c "samba") -ne 0 ]; then case "$(pkg info | egrep -m 1 -o "samba[0-9][0-9]")" in "samba36") SERVICE="samba36" @@ -61,7 +61,7 @@ find_service_dependencies - SERVICE_INCLUDING_DENDENCIES_UPGRADED=$(egrep '(Installing (.*)\.\.\. |Reinstalling (.*)\.\.\. |Upgrading (.*) from (.*) to (.*)\.\.\.) ' ${UPGRADE_LOG} | egrep "${SERVICE}" | awk 'END{print NR}') + SERVICE_INCLUDING_DENDENCIES_UPGRADED=$(egrep '(Installing (.*)\.\.\.|Reinstalling (.*)\.\.\.|Upgrading (.*) from (.*) to (.*)\.\.\.)' ${UPGRADE_LOG} | egrep "${SERVICE}" | awk 'END{print NR}') if [ "${SERVICE_INCLUDING_DENDENCIES_UPGRADED}" -gt "0" ]; then SERVICE_BEEN_UPGRADED="yes" @@ -86,7 +86,7 @@ EMAIL_ADDRESS="storageadm@slu.se" BASE_SERVICES=$(ls -1 /etc/rc.d | tr '\n' ' ' | sed -e 's/ /\|/g' -e 's/\|$/\|nfs/') - META_SERVICES="winbind|avahi|afpd|cnid" + META_SERVICES="smbd|nmbd|winbind|avahi|afpd|cnid" SERVICES=$(egrep -v "(\#|${BASE_SERVICES}|${META_SERVICES})" /etc/rc.conf | awk -F '=' '/enable/ {gsub(/_enable/, "");gsub(/_/, "-");print $1}' | tr '\n' ' ' | sed 's/ $//') PKG_UPGRADE="pkg upgrade -y"