Added --enable-rule-generator, usher for mkinitramfs, and dependencies
This commit is contained in:
34
SNAP/usher
Executable file
34
SNAP/usher
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
case $1 in
|
||||
preinst)
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
KERNEL_VER=`ls -C1rt ${TARGET}/boot/vmlinuz*|sed 's/.*vmlinuz-//'`
|
||||
|
||||
if [[ ${TARGET} ]]; then
|
||||
echo "Running within ${TARGET} for kernel $KERNEL_VER"
|
||||
if ! mountpoint -q ${TARGET}/proc; then
|
||||
mount -t proc none ${TARGET}/proc
|
||||
fi
|
||||
|
||||
chroot ${TARGET} /bin/bash -c "/sbin/mkinitramfs $KERNEL_VER"
|
||||
|
||||
if mountpoint -q ${TARGET}/proc; then
|
||||
umount ${TARGET}/proc
|
||||
fi
|
||||
else
|
||||
echo "Running for kernel $KERNEL_VER"
|
||||
mkinitramfs $KERNEL_VER
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
exit 0
|
||||
;;
|
||||
postrm)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user