triggers: there's no need to call chroot anymore.
--HG-- extra : convert_revision : cea0ba9863c0934d8d876801989947e03588d835
This commit is contained in:
parent
2ff413127b
commit
22f6b0eac7
2 changed files with 6 additions and 14 deletions
|
@ -21,19 +21,11 @@ run)
|
||||||
|
|
||||||
echo "Running $trigger trigger..."
|
echo "Running $trigger trigger..."
|
||||||
|
|
||||||
if [ "$(pwd)" = "/" ]; then
|
mntproc_cmd="mount -t proc proc /proc"
|
||||||
mntproc_cmd="mount -t proc proc /proc"
|
umntproc_cmd="umount /proc"
|
||||||
umntproc_cmd="umount /proc"
|
mntsys_cmd="mount -t sysfs none /sys"
|
||||||
mntsys_cmd="mount -t sysfs none /sys"
|
umntsys_cmd="umount /sys"
|
||||||
umntsys_cmd="umount /sys"
|
initramfs_cmd="update-initramfs"
|
||||||
initramfs_cmd="update-initramfs"
|
|
||||||
else
|
|
||||||
mntproc_cmd="chroot . mount -t proc proc ./proc"
|
|
||||||
umntproc_cmd="chroot . umount ./proc"
|
|
||||||
mntsys_cmd="chroot . mount -t sysfs none ./sys"
|
|
||||||
umntsys_cmd="chroot . umount ./sys"
|
|
||||||
initramfs_cmd="chroot . update-initramfs"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$3" = "kernel" -a ! -f ./var/lib/initramfs-tools/$4 ]; then
|
if [ "$3" = "kernel" -a ! -f ./var/lib/initramfs-tools/$4 ]; then
|
||||||
initramfs_cmd="$initramfs_cmd -c -k $4"
|
initramfs_cmd="$initramfs_cmd -c -k $4"
|
||||||
|
|
|
@ -35,7 +35,7 @@ run)
|
||||||
echo "Building ${dir}/fonts.scale..."
|
echo "Building ${dir}/fonts.scale..."
|
||||||
${mkfontscale} .${dir} || exit $?
|
${mkfontscale} .${dir} || exit $?
|
||||||
echo "Updating fontconfig's cache..."
|
echo "Updating fontconfig's cache..."
|
||||||
chroot . ${fccache} .${dir} 2>/dev/null
|
${fccache} .${dir} 2>/dev/null
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
pre-remove)
|
pre-remove)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue