udev: Auto-add the rootfs partition to mount.blacklist via postinst to work around...
authorMatthias Hentges <oe@hentges.net>
Tue, 7 Nov 2006 12:02:31 +0000 (12:02 +0000)
committerMatthias Hentges <oe@hentges.net>
Tue, 7 Nov 2006 12:02:31 +0000 (12:02 +0000)
packages/udev/files/mount.sh
packages/udev/udev_092.bb
packages/udev/udev_097.bb
packages/udev/udev_100.bb

index 48c7844..be8b3df 100644 (file)
@@ -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
index 2de59fb..3d33938 100644 (file)
@@ -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
+       
+}
+
index 3abd9b5..4973577 100644 (file)
@@ -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
+       
+}
+
+
index 31d49d4..183d785 100644 (file)
@@ -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
+       
+}
+