diff options
author | Matthias Hentges <oe@hentges.net> | 2006-11-07 12:02:31 +0000 |
---|---|---|
committer | Matthias Hentges <oe@hentges.net> | 2006-11-07 12:02:31 +0000 |
commit | 3b7d18f95dbaaca9faa1ffcc9a780431e7351902 (patch) | |
tree | e1c739a8399ba2e9f9b76ffbace59b2c58b63f79 /packages | |
parent | b2b8e8ebef369da9281fea67b2c0c7e57d48f6e4 (diff) |
udev: Auto-add the rootfs partition to mount.blacklist via postinst to work around a bug in the auto-mounter * * Untested in .dev! * *
Diffstat (limited to 'packages')
-rw-r--r-- | packages/udev/files/mount.sh | 5 | ||||
-rw-r--r-- | packages/udev/udev_092.bb | 19 | ||||
-rw-r--r-- | packages/udev/udev_097.bb | 20 | ||||
-rw-r--r-- | packages/udev/udev_100.bb | 19 |
4 files changed, 60 insertions, 3 deletions
diff --git a/packages/udev/files/mount.sh b/packages/udev/files/mount.sh index 48c7844690..be8b3dfca9 100644 --- a/packages/udev/files/mount.sh +++ b/packages/udev/files/mount.sh @@ -50,6 +50,11 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then fi # If the device isn't mounted at this point, it isn't configured in fstab + # 20061107: Small correction: The rootfs partition may be called just "rootfs" and not by + # its true device name so this would break. If the rootfs is mounted on two places + # during boot, it confuses the heck out of fsck. So Im auto-adding the root-partition + # to /etc/udev/mount.blacklist via postinst + cat /proc/mounts | awk '{print $1}' | grep -q "^$DEVNAME$" || automount fi diff --git a/packages/udev/udev_092.bb b/packages/udev/udev_092.bb index 2de59fb018..3d33938fb1 100644 --- a/packages/udev/udev_092.bb +++ b/packages/udev/udev_092.bb @@ -3,7 +3,7 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod the hotplug package and requires a kernel not older than 2.6.12." RPROVIDES = "hotplug" -PR = "r12" +PR = "r13" SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ file://noasmlinkage.patch;patch=1 \ @@ -57,3 +57,20 @@ do_install () { do_install_append_h2200() { install -m 0644 ${WORKDIR}/50-hostap_cs.rules ${D}${sysconfdir}/udev/rules.d/50-hostap_cs.rules } + +pkg_postinst_append() { + + # Add the root partition to mount.blacklist to avoid a bug in the auto-mounter, + # causing confusion with fsck on boot + + while read dev mp fs junk + do + if test "$mp" = "/" + then + root_partition="$dev" + echo "$root_partition" >> /etc/udev/mount.blacklist + fi + done < /etc/fstab + +} + diff --git a/packages/udev/udev_097.bb b/packages/udev/udev_097.bb index 3abd9b5fa7..497357775e 100644 --- a/packages/udev/udev_097.bb +++ b/packages/udev/udev_097.bb @@ -8,7 +8,7 @@ used to detect the type of a file system and read its metadata." DESCRIPTION_libvolume-id-dev = "libvolume_id development headers, \ needed to link programs with libvolume_id." -PR = "r3" +PR = "r4" SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ file://noasmlinkage.patch;patch=1 \ @@ -61,3 +61,21 @@ do_install () { do_install_append_h2200() { install -m 0644 ${WORKDIR}/50-hostap_cs.rules ${D}${sysconfdir}/udev/rules.d/50-hostap_cs.rules } + +pkg_postinst_append() { + + # Add the root partition to mount.blacklist to avoid a bug in the auto-mounter, + # causing confusion with fsck on boot + + while read dev mp fs junk + do + if test "$mp" = "/" + then + root_partition="$dev" + echo "$root_partition" >> /etc/udev/mount.blacklist + fi + done < /etc/fstab + +} + + diff --git a/packages/udev/udev_100.bb b/packages/udev/udev_100.bb index 31d49d44d8..183d785627 100644 --- a/packages/udev/udev_100.bb +++ b/packages/udev/udev_100.bb @@ -9,7 +9,7 @@ used to detect the type of a file system and read its metadata." DESCRIPTION_libvolume-id-dev = "libvolume_id development headers, \ needed to link programs with libvolume_id." -PR = "r2" +PR = "r3" SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ file://noasmlinkage.patch;patch=1 \ @@ -62,3 +62,20 @@ do_install () { do_install_append_h2200() { install -m 0644 ${WORKDIR}/50-hostap_cs.rules ${D}${sysconfdir}/udev/rules.d/50-hostap_cs.rules } + +pkg_postinst_append() { + + # Add the root partition to mount.blacklist to avoid a bug in the auto-mounter, + # causing confusion with fsck on boot + + while read dev mp fs junk + do + if test "$mp" = "/" + then + root_partition="$dev" + echo "$root_partition" >> /etc/udev/mount.blacklist + fi + done < /etc/fstab + +} + |