Updating samhain workaround in chroot_dpkg to work if live-build is being used with sudo or fakeroot (Closes: #698423).
This commit is contained in:
parent
c6c1e8db08
commit
c1ea3c7fb4
|
@ -64,10 +64,10 @@ EOF
|
||||||
# samhain
|
# samhain
|
||||||
if [ -e /var/state/samhain/samhain_file ]
|
if [ -e /var/state/samhain/samhain_file ]
|
||||||
then
|
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
|
else
|
||||||
mkdir -p /var/state/samhain
|
${LB_ROOT_COMMAND} mkdir -p /var/state/samhain
|
||||||
touch /var/state/samhain/samhain_file
|
${LB_ROOT_COMMAND} touch /var/state/samhain/samhain_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# flash-kernel
|
# flash-kernel
|
||||||
|
@ -96,11 +96,11 @@ EOF
|
||||||
# samhain
|
# samhain
|
||||||
if [ -e /var/state/samhain/samhain_file.orig ]
|
if [ -e /var/state/samhain/samhain_file.orig ]
|
||||||
then
|
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 ]
|
elif [ -d /var/state/samhain ]
|
||||||
then
|
then
|
||||||
rm -f /var/state/samhain/samhain_file
|
${LB_ROOT_COMMAND} rm -f /var/state/samhain/samhain_file
|
||||||
rmdir --ignore-fail-on-non-empty /var/state/samhain || true
|
${LB_ROOT_COMMAND} rmdir --ignore-fail-on-non-empty /var/state/samhain || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restore start-stop-daemon program
|
# Restore start-stop-daemon program
|
||||||
|
|
Loading…
Reference in New Issue