Re: Freeze exception: tumgreyspf 1.35-5 (bugfix: #590492)
On Thu, 2010-08-26 at 13:55 +0800, Thomas Goirand wrote:
> My tumgreyspf packag suffered from 2 issues:
> - when there was no mail traffic, the cron.daily had errors, which sent
> a mail to the system root user.
> - the postinst script created a system user in /home, which was quite
> ugly (now it goes in /var/lib/tumgreyspf).
Actually, /var/lib/tumgreyspf/${TUMUSER}, due to your use of -b:
- useradd -m -s /bin/false -g nogroup ${TUMUSER}
+ useradd -m -s /bin/false -g nogroup ${TUMUSER} -r -b /var/lib/tumgreyspf
useradd(8):
-b, --base-dir BASE_DIR
The default base directory for the system if -d HOME_DIR is not specified. BASE_DIR is
concatenated with the account name to define the home directory.
+if [ -x `which usermod` ] ; then
+ usermod -d /var/lib/tumgreyspf
+fi
The usermod call is missing a username to operate on.
+ echo "Warning: tumgreyspf.postinst had found an old /etc/cron.d/tumgreyspf,"
+ echo "and will be deleting it as this version of the package doesn't use the"
+ echo "old python script, but a new sh script in /etc/cron.daily/tumgreyspf."
Might I suggest something more along the lines of
"/etc/cron.d/tumgreyspdf has been replaced
by /etc/cron.daily/tumgreyspf; the old file has been deleted". Aside
from the fact that by the time the user reads the message the file _has
been_ deleted, and the mix of tenses, the user shouldn't need to care
that you've replaced a Python script with a shell script.
You should probably also only remove the old file if it's the version
which was shipped by the package.
Regards,
Adam
Reply to: