use /usr/libexec/uucp/clean.weekly instead of /usr/lib/uucp/clean.weekly [misc/4357], and use su user -c command instead of echo command | su user

This commit is contained in:
lukem 1997-10-27 04:11:40 +00:00
parent 0c8d4acbc4
commit d5b4ca3bbf
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: weekly,v 1.8 1997/03/10 09:45:59 mycroft Exp $
# $NetBSD: weekly,v 1.9 1997/10/27 04:11:40 lukem Exp $
# from: @(#)weekly 8.2 (Berkeley) 1/2/94
#
@ -45,10 +45,10 @@ fi
# rm -rf $TDIR
#fi
if [ "$clean_uucp" = YES ] && [ -f /usr/lib/uucp/clean.weekly ]; then
if [ "$clean_uucp" = YES ] && [ -f /usr/libexec/uucp/clean.weekly ]; then
echo ""
echo "Cleaning up UUCP:"
echo /usr/lib/uucp/clean.weekly | su daemon
su daemon -c /usr/libexec/uucp/clean.weekly
fi
echo ""
@ -57,7 +57,7 @@ if [ "$rebuild_locatedb" = YES ] && [ -f /var/db/locate.database ]; then
echo "Rebuilding locate database:"
chmod 644 /var/db/locate.database
chown nobody.nobody /var/db/locate.database
echo /usr/libexec/locate.updatedb | nice -5 su -m nobody 2>/dev/null
nice -5 su -m nobody -c /usr/libexec/locate.updatedb 2>/dev/null
chown root.wheel /var/db/locate.database
else
echo "Not rebuilding locate database; no /var/db/locate.database"