3 grep -qs boot=casper /proc/cmdline || exit 0
5 # Try to cache everything we're likely to need after ejecting. This
6 # is fragile and simple-minded, but our options are limited.
10 if [ -d "$path" ]; then
11 find "$path" -type f | xargs cat > /dev/null 2>&1
12 elif [ -f "$path" ]; then
13 if [ -x "$path" ]; then
14 if file "$path" | grep -q 'dynamically linked'; then
15 for lib in $(ldd "$path" | awk '{ print $3 }'); do
20 cat "$path" >/dev/null 2>&1
24 for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do
28 eject -p -m /live_media >/dev/null 2>&1
31 echo -n "Please remove the disc (if any), close the tray (if any) and press ENTER: "
32 if [ -x /sbin/usplash_write ]; then
33 /sbin/usplash_write "TIMEOUT 0"
34 /sbin/usplash_write "TEXT Please remove the disc, close the tray (if any)"
35 /sbin/usplash_write "TEXT and press ENTER to continue"