summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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