Index: head/japanese/mailman/files/pkg-deinstall.in =================================================================== --- head/japanese/mailman/files/pkg-deinstall.in (revision 463638) +++ head/japanese/mailman/files/pkg-deinstall.in (revision 463639) @@ -1,53 +1,52 @@ #! /bin/sh # # $FreeBSD$ PATH=/bin:/usr/bin:/usr/sbin case $2 in DEINSTALL) echo "---> Starting deinstall script" if /usr/bin/crontab -u "%%USER%%" -l | \ /usr/bin/diff -B -b - "%%MAILMANDIR%%/cron/crontab.in" >/dev/null 2>&1 ; then echo "---> Zeroing crontab for \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" -r /var/cron/allow.new$$ mv /var/cron/allow.new$$ /var/cron/allow fi else echo "---> Crontab for \"%%USER%%\" modified, not removed: please deinstall" echo "---> it manually if you no longer wish to use Mailman. E.g.:" echo "---> /usr/bin/crontab -u \"%%USER%%\" -r" fi echo "---> Preserving the \"last_mailman_version\" file" /bin/mv -f "%%MAILMANDIR%%/data/last_mailman_version" /var/tmp/ # If the errorlog is the only existing logfile, delete it. (If Mailman's # qrunner had not been running, then the process of trying to stop the # qrunner (above) will cause the errorlog to be written to. Hence, even if # the Mailman port/package is installed and immediately deinstalled, the # errorlog will exist.) if [ "`echo %%MAILMANDIR%%/logs/*`" = "%%MAILMANDIR%%/logs/error" ]; then echo "---> Deleting errorlog (It is the only existing logfile.)" /bin/rm -f "%%MAILMANDIR%%/logs/error" fi ;; POST-DEINSTALL) echo "---> Starting post-deinstall script" # try to kill all empty directories - necessary on pkg_add-based systems - find "%%MAILMANDIR%%" -depth -type d -exec rmdir '{}' + >/dev/null 2>&1 || : if [ -d "%%MAILMANDIR%%" ]; then echo '---> %%MAILMANDIR%% is not empty - this installation may have active lists!' ls -lRB "%%MAILMANDIR%%" | head -n200 || : echo "---> Restoring \"last_mailman_version\" file" /bin/mkdir -p "%%MAILMANDIR%%/data" /bin/mv -f /var/tmp/last_mailman_version "%%MAILMANDIR%%/data/" fi ;; esac Property changes on: head/japanese/mailman/files/pkg-deinstall.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/japanese/mailman/files/pkg-install.in =================================================================== --- head/japanese/mailman/files/pkg-install.in (revision 463638) +++ head/japanese/mailman/files/pkg-install.in (revision 463639) @@ -1,47 +1,55 @@ #! /bin/sh # # $FreeBSD$ PATH=/bin:/usr/bin:/usr/sbin case $2 in POST-INSTALL) echo "---> Starting post-install script" MYTMP="$(mktemp -d "${TMPDIR-/tmp}/mminstall.XXXXXXXXXX")" || exit 1 trap "rm -rf \"$MYTMP\"" EXIT /bin/chmod g+s "%%MAILMANDIR%%" || exit 1 echo "---> Running update" + for DIR in logs archives lists locks data spam qfiles \ + archives/private archives/public + do + if [ ! -e "%%MAILMANDIR%%/$DIR" ]; then + /bin/mkdir -p "%%MAILMANDIR%%/$DIR" + fi + done + LC_ALL=C "%%MAILMANDIR%%/bin/update" || exit 1 echo "---> Checking crontab(5) file for user \"%%USER%%\"" if [ -e /var/cron/allow ]; then grep -q "^%%USER%%\$" /var/cron/allow || \ printf '%s\n' "%%USER%%" >> /var/cron/allow fi if /usr/bin/crontab -u "%%USER%%" -l >"$MYTMP/crontab" 2>&1 ; then if test -s "$MYTMP/crontab"; then echo "---> \"%%USER%%\" already has a crontab. Not overwriting it" echo "---> Please merge any changes from the standard crontab file" echo "---> %%MAILMANDIR%%/cron/crontab.in" else echo "---> Installing crontab(5) file for user \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" || exit 1 fi else echo "---> Creating crontab(5) file for user \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" || exit 1 fi rm -f "$MYTMP/crontab" echo "---> Checking (and fixing) file and directory permissions" "%%MAILMANDIR%%/bin/check_perms" -f >/dev/null ;; esac Property changes on: head/japanese/mailman/files/pkg-install.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property