Skip to content

Commit

Permalink
Replacing previous imperfect changes for udevadm with check for udeva…
Browse files Browse the repository at this point in the history
…dm and using old commands when beeing on etch. Also handling udevtrigger with udevadm if available.
  • Loading branch information
daniel-baumann committed Jul 15, 2008
1 parent 90107c6 commit 97a0403
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -12,7 +12,7 @@ XS-Upstream-Depends: git-core

Package: live-initramfs
Architecture: all
Depends: ${misc:Depends}, busybox, file, initramfs-tools, sudo, udev (>= 0.124), user-setup
Depends: ${misc:Depends}, busybox, file, initramfs-tools, sudo, udev, user-setup
Recommends: eject, loop-aes-utils, uuid-runtime, wget
Suggests: curlftpfs, genext2fs (>= 1.4.1), httpfs2, squashfs-tools, mtd-tools
Description: Debian Live initramfs hook
Expand Down
11 changes: 9 additions & 2 deletions hooks/live
Expand Up @@ -126,8 +126,15 @@ fi
copy_exec /usr/bin/md5sum /bin

# Program: udev
copy_exec /sbin/udevadm /sbin
copy_exec /sbin/udevsettle /sbin
if [ -x /sbin/udevadm ]
then
# lenny
copy_exec /sbin/udevadm /sbin
else
# etch
copy_exec /sbin/udevtrigger /sbin
copy_exec /sbin/udevsettle /sbin
fi
copy_exec /usr/bin/udevinfo /bin

# Program: wget
Expand Down
24 changes: 20 additions & 4 deletions scripts/live
Expand Up @@ -650,8 +650,16 @@ do_netmount ()

modprobe -q af_packet # For DHCP

udevadm trigger
udevsettle
if [ -x /sbin/udevadm ]
then
# lenny
udevadm trigger
udevadm settle
else
# etch
udevtrigger
udevsettle
fi

ipconfig ${DEVICE} | tee /netboot.config

Expand Down Expand Up @@ -1041,8 +1049,16 @@ setup_unionfs ()
modprobe -q -b ${module}
done

udevadm trigger
udevsettle
if [ -x /sbin/udevadm ]
then
# lenny
udevadm trigger
udevadm settle
else
# etch
udevtrigger
udevsettle
fi

# For some reason, udevsettle does not block in this scenario,
# so we sleep for a little while.
Expand Down
12 changes: 10 additions & 2 deletions scripts/live-bottom/23networking
Expand Up @@ -46,8 +46,16 @@ iface lo inet loopback
EOF

udevadm trigger
udevsettle
if [ -x /sbin/udevadm ]
then
# lenny
udevadm trigger
udevadm settle
else
# etch
udevtrigger
udevsettle
fi

if [ -z "${NETBOOT}" -a -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ]
then
Expand Down

0 comments on commit 97a0403

Please sign in to comment.