The following changes were made:
* Split off separate dev package * Moved config to usr/share/eudev (managed by usher) * Added init file
This commit is contained in:
22
SNAP/usher
22
SNAP/usher
@@ -7,22 +7,16 @@ case $1 in
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
KERNEL_VER=`ls -C1rt ${TARGET}/boot/vmlinuz*|sed 's/.*vmlinuz-//'`
|
||||
if [ ! -f ${TARGET}/etc/udev/udev.conf ]; then
|
||||
install -m 644 ${TARGET}/usr/share/eudev/udev.conf \
|
||||
${TARGET}/etc/udev/udev.conf
|
||||
fi
|
||||
|
||||
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
|
||||
if [[ ! ${TARGET} ]]; then
|
||||
/etc/init.d/udevd restart
|
||||
update-rc enable udevd
|
||||
else
|
||||
echo "Running for kernel $KERNEL_VER"
|
||||
mkinitramfs $KERNEL_VER
|
||||
chroot ${TARGET} 'update-rc enable udevd'
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
|
||||
Reference in New Issue
Block a user