summaryrefslogtreecommitdiff
path: root/scripts/build/chroot_dpkg
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2013-01-19 12:46:40 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 14:50:04 +0200
commit6d3b6b7b9bb6f6b56774f1368ecfa03953c74332 (patch)
tree4cbb19bb308088bd54392a3b116907d8f5a12d0c /scripts/build/chroot_dpkg
parentfc7c8e019d49f72c79161e083dfbb0ca0da6fd7a (diff)
downloadvyos-live-build-6d3b6b7b9bb6f6b56774f1368ecfa03953c74332.tar.gz
vyos-live-build-6d3b6b7b9bb6f6b56774f1368ecfa03953c74332.zip
Updating samhain workaround in chroot_dpkg to work if live-build is being used with sudo or fakeroot (Closes: #698423).
Diffstat (limited to 'scripts/build/chroot_dpkg')
-rwxr-xr-xscripts/build/chroot_dpkg12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg
index c67d8eb96..b9fa840e0 100755
--- a/scripts/build/chroot_dpkg
+++ b/scripts/build/chroot_dpkg
@@ -64,10 +64,10 @@ EOF
# samhain
if [ -e /var/state/samhain/samhain_file ]
then
- mv /var/state/samhain/samhain_file /var/state/samhain/samhain_file.orig
+ ${LB_ROOT_COMMAND} mv /var/state/samhain/samhain_file /var/state/samhain/samhain_file.orig
else
- mkdir -p /var/state/samhain
- touch /var/state/samhain/samhain_file
+ ${LB_ROOT_COMMAND} mkdir -p /var/state/samhain
+ ${LB_ROOT_COMMAND} touch /var/state/samhain/samhain_file
fi
# flash-kernel
@@ -96,11 +96,11 @@ EOF
# samhain
if [ -e /var/state/samhain/samhain_file.orig ]
then
- mv /var/state/samhain/samhain_file.orig /var/state/samhain/samhain_file
+ ${LB_ROOT_COMMAND} mv /var/state/samhain/samhain_file.orig /var/state/samhain/samhain_file
elif [ -d /var/state/samhain ]
then
- rm -f /var/state/samhain/samhain_file
- rmdir --ignore-fail-on-non-empty /var/state/samhain || true
+ ${LB_ROOT_COMMAND} rm -f /var/state/samhain/samhain_file
+ ${LB_ROOT_COMMAND} rmdir --ignore-fail-on-non-empty /var/state/samhain || true
fi
# Restore start-stop-daemon program