[Debian-live-changes] r1148 - in dists/trunk/live-helper: functions
helpers
Daniel Baumann
daniel at alioth.debian.org
Tue Apr 24 07:18:13 UTC 2007
Author: daniel
Date: 2007-04-24 07:18:12 +0000 (Tue, 24 Apr 2007)
New Revision: 1148
Modified:
dists/trunk/live-helper/functions/defaults.sh
dists/trunk/live-helper/helpers/lh_binary_chroot
dists/trunk/live-helper/helpers/lh_clean
Log:
Modified: dists/trunk/live-helper/functions/defaults.sh
===================================================================
--- dists/trunk/live-helper/functions/defaults.sh 2007-04-24 07:15:02 UTC (rev 1147)
+++ dists/trunk/live-helper/functions/defaults.sh 2007-04-24 07:18:12 UTC (rev 1148)
@@ -216,7 +216,11 @@
LH_VERBOSE="disabled"
fi
- # LH_ROOT_COMMAND
+ # If we are root, disable root command
+ if [ "`id -u`" = "0" ]
+ then
+ LIVE_ROOT_COMMAND=""
+ fi
## config/bootstrap
Modified: dists/trunk/live-helper/helpers/lh_binary_chroot
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_chroot 2007-04-24 07:15:02 UTC (rev 1147)
+++ dists/trunk/live-helper/helpers/lh_binary_chroot 2007-04-24 07:18:12 UTC (rev 1148)
@@ -57,13 +57,13 @@
fi
# Removing old chroot
-rm -rf chroot/chroot
-rm -rf chroot.tmp
+${LH_ROOT_COMMAND} rm -rf chroot/chroot
+${LH_ROOT_COMMAND} rm -rf chroot.tmp
# Copying new chroot
Echo_message "Copying chroot, this can take a while."
-cp -a chroot chroot.tmp
-mv chroot.tmp chroot/chroot
+${LH_ROOT_COMMAND} cp -a chroot chroot.tmp
+${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
# Creating stage file
Create_stagefile .stage/binary_chroot
Modified: dists/trunk/live-helper/helpers/lh_clean
===================================================================
--- dists/trunk/live-helper/helpers/lh_clean 2007-04-24 07:15:02 UTC (rev 1147)
+++ dists/trunk/live-helper/helpers/lh_clean 2007-04-24 07:18:12 UTC (rev 1148)
@@ -47,7 +47,7 @@
;;
cache)
- rm -rf cache
+ ${LH_ROOT_COMMAND} rm -rf cache
;;
chroot)
@@ -58,11 +58,11 @@
${LH_ROOT_COMMAND} umount -f chroot/dev/pts > /dev/null 2>&1 || true
${LH_ROOT_COMMAND} umount -f chroot/dev > /dev/null 2>&1 || true
- rm -rf chroot chroot.tmp
+ ${LH_ROOT_COMMAND} rm -rf chroot chroot.tmp
if [ "${PURGE}" != "true" ] && [ -d cache/chroot_bootstrap ]
then
- cp -a cache/chroot_bootstrap chroot
+ ${LH_ROOT_COMMAND} cp -a cache/chroot_bootstrap chroot
mkdir -p .stage
touch .stage/bootstrap
fi
More information about the Debian-live-changes
mailing list