The following changes were made:
* removed mounting tmp filesystems from user (now done by snap) * split off separate doc package * Added package name override to prevent duplicated version string in name * removed version string from file name (Makefile.linux-headers)
This commit is contained in:
34
SNAP/usher
34
SNAP/usher
@@ -7,37 +7,15 @@ case $1 in
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
KERNEL_VER=`ls -C1rt ${TARGET}/boot/vmlinuz*|sed 's/.*vmlinuz-//'`
|
||||
|
||||
if [[ ${TARGET} ]]; then
|
||||
echo "Running within ${TARGET} for kernel $KERNEL_VER"
|
||||
echo "Running within ${TARGET} for kernel ${VERSION}"
|
||||
|
||||
if ! mountpoint -q ${TARGET}/dev; then
|
||||
mount -t devtmpfs none ${TARGET}/dev
|
||||
fi
|
||||
if ! mountpoint -q ${TARGET}/proc; then
|
||||
mount -t proc none ${TARGET}/proc
|
||||
fi
|
||||
if ! mountpoint -q ${TARGET}/sys; then
|
||||
mount -t sysfs none ${TARGET}/sys
|
||||
fi
|
||||
|
||||
chroot ${TARGET} /bin/bash -c "/sbin/mkinitramfs $KERNEL_VER"
|
||||
chroot ${TARGET} /bin/bash -c \
|
||||
"/sbin/grub-mkconfig -o /boot/grub/grub.cfg"
|
||||
|
||||
if mountpoint -q ${TARGET}/dev; then
|
||||
umount ${TARGET}/dev
|
||||
fi
|
||||
if mountpoint -q ${TARGET}/proc; then
|
||||
umount ${TARGET}/proc
|
||||
fi
|
||||
if mountpoint -q ${TARGET}/sys; then
|
||||
umount ${TARGET}/sys
|
||||
fi
|
||||
chroot ${TARGET} mkinitramfs ${VERSION}
|
||||
chroot ${TARGET} grub-mkconfig -o /boot/grub/grub.cfg
|
||||
else
|
||||
echo "Running for kernel $KERNEL_VER"
|
||||
mkinitramfs $KERNEL_VER
|
||||
echo "Running for kernel ${VERSION}"
|
||||
|
||||
mkinitramfs ${VERSION}
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
fi
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user