4 if grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline || grep -qsi root=/dev/cifs /proc/cmdline ; then
8 grep -qs boot=casper /proc/cmdline || exit 0
10 # Try to cache everything we're likely to need after ejecting. This
11 # is fragile and simple-minded, but our options are limited.
15 if [ -d "$path" ]; then
16 find "$path" -type f | xargs cat > /dev/null 2>&1
17 elif [ -f "$path" ]; then
18 if [ -x "$path" ]; then
19 if file "$path" | grep -q 'dynamically linked'; then
20 for lib in $(ldd "$path" | awk '{ print $3 }'); do
25 cat "$path" >/dev/null 2>&1
29 for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do
33 eject -p -m /live_media >/dev/null 2>&1
36 echo -n "Please remove the disc (if any), close the tray (if any) and press ENTER: "
37 if [ -x /sbin/usplash_write ]; then
38 /sbin/usplash_write "TIMEOUT 0"
39 /sbin/usplash_write "TEXT Please remove the disc, close the tray (if any)"
40 /sbin/usplash_write "TEXT and press ENTER to continue"