diff options
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-05-02 16:00:32 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2011-05-14 13:14:37 +0200 |
commit | 60c9d0d292fbb8a54aaeec99037ef0d684897233 (patch) | |
tree | 8a4a1b82d060c23404848a7938e88772e84b4be0 /init | |
parent | df4bce44c5e21357043930e02acac23f104ea9b8 (diff) | |
download | mkinitcpio-60c9d0d292fbb8a54aaeec99037ef0d684897233.tar.gz mkinitcpio-60c9d0d292fbb8a54aaeec99037ef0d684897233.tar.xz |
Cleanly stop udev >= 168 as recommended by upstream.
>From udev NEWS:
The running udev daemon can now cleanly shut down with:
udevadm control --exit
Udev in initramfs should clean the state of the udev database
with: udevadm info --cleanup-db which will remove all state left
behind from events/rules in initramfs. If initramfs uses
--cleanup-db and device-mapper/LVM, the rules in initramfs need
to add OPTIONS+="db_persist" for all dm devices. This will
prevent removal of the udev database for these devices.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'init')
-rw-r--r-- | init | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -118,15 +118,10 @@ elif [ ! -x "/new_root${init}" ]; then launch_interactive_shell --exec fi -#Special handling if udev is running -udevpid=$(/bin/pidof udevd) -if [ -n "${udevpid}" ]; then - # Settle pending uevents, then kill udev - /sbin/udevadm settle - /bin/kill ${udevpid} > /dev/null 2>&1 - while /bin/pidof udevd >/dev/null; do - sleep 0.1 - done +# Stop udevd if is running +if [ "${udevd_running}" -eq 1 ]; then + /sbin/udevadm control --exit + /sbin/udevadm info --cleanup-db fi for d in proc sys dev run; do |