53747489f0
Also the following changes were made: * Added an info-files trigger, to (un)register info files. * xbps-base-dirs: it's responsible to install triggers on destdir. --HG-- extra : convert_revision : 8d707053616f38d2b5beef7cf28e1bc4a66812b8
36 lines
837 B
Text
36 lines
837 B
Text
#
|
|
# This scripts creates the initramfs for the newly installed
|
|
# kernel package.
|
|
#
|
|
case "$2" in
|
|
pre)
|
|
;;
|
|
post)
|
|
echo "Running $3-$4 post installation hooks..."
|
|
if [ "$1" = "NOTSET" ]; then
|
|
mntproc_cmd="mount -t proc proc /proc"
|
|
umntproc_cmd="umount /proc"
|
|
mntsys_cmd="mount -t sysfs none /sys"
|
|
umntsys_cmd="umount /sys"
|
|
initramfs_cmd="update-initramfs"
|
|
else
|
|
mntproc_cmd="chroot $1 mount -t proc proc ./proc"
|
|
umntproc_cmd="chroot $1 umount ./proc"
|
|
mntsys_cmd="chroot $1 mount -t sysfs none ./sys"
|
|
umntsys_cmd="chroot $1 umount ./sys"
|
|
initramfs_cmd="chroot $1 update-initramfs"
|
|
fi
|
|
|
|
if [ ! -f ./var/lib/initramfs-tools/$4 ]; then
|
|
initramfs_cmd="$initramfs_cmd -c -k $4"
|
|
else
|
|
initramfs_cmd="$initramfs_cmd -u -k $4"
|
|
fi
|
|
|
|
${mntproc_cmd}
|
|
${mntsys_cmd}
|
|
${initramfs_cmd}
|
|
${umntproc_cmd}
|
|
${umntsys_cmd}
|
|
;;
|
|
esac
|