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:
2017-05-05 18:03:04 -05:00
parent 999694fe4c
commit 3e831956ff
4 changed files with 86 additions and 20 deletions

View File

@@ -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)