summaryrefslogtreecommitdiffstats
path: root/partimage
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-01-26 22:37:32 +0000
committer Eric Hameleers <alien@slackware.com>2008-01-26 22:37:32 +0000
commit102e58f867c390a1ee8c9a573eb9dcdd96debe22 (patch)
tree51af26d2084b4ba1fb7eb87070d5d1fbd2328606 /partimage
parentacdb783b3208b13047cb12c26e8c44c37e4701eb (diff)
downloadasb-102e58f867c390a1ee8c9a573eb9dcdd96debe22.tar.gz
asb-102e58f867c390a1ee8c9a573eb9dcdd96debe22.tar.xz
Updated with several chroot's, getent instead of a grep, and an exit statement if uidNumber 77 exists but is not user partimage
Diffstat (limited to 'partimage')
-rw-r--r--partimage/build/doinst.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/partimage/build/doinst.sh b/partimage/build/doinst.sh
index 088e162b..545a8792 100644
--- a/partimage/build/doinst.sh
+++ b/partimage/build/doinst.sh
@@ -21,15 +21,17 @@ partdatadir="var/spool/partimaged"
opensslpath="/usr/bin/openssl"
# Create the partimage account
-if ! grep $partuser etc/passwd > /dev/null 2>&1
+if ! chroot . getent passwd $partuser > /dev/null 2>&1
then
- useradd -c "Partition Image daemon" -g root -u $partuid -d /tmp -s /bin/false $partuser
+ chroot . useradd -c "Partition Image daemon" -g root -u $partuid -d /tmp -s /bin/false $partuser
res=$?
if [ $res -ne 0 ]
then
- echo "User with UID $partuid already exists! You'll have to delete it and add a $partuser user manually!"
+ echo "User with UID $partuid already exists! You'll have add a $partuser user manually!"
echo "Run this command: \"useradd -c 'Partition Image daemon' -u UID -g root -d /tmp -s /bin/false $partuser\""
echo "And select a free value for UID that is below 500 (check /etc/passwd)"
+ echo "Then, run an \"upgradepkg --reinstall\" of this partimage package so that it can run the rest of the install script. "
+ exit $res
fi
fi