Subversion Repositories livecd

Rev

Rev 1 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 214
Line 241... Line 241...
241
   /sbin/halt.local
241
   /sbin/halt.local
242
fi
242
fi
243
 
243
 
244
# ------------------ LiveCD -------------------------
244
# ------------------ LiveCD -------------------------
245
 
245
 
-
 
246
# dir of mounted live system: /$MOUNTDIR/live
-
 
247
MOUNTDIR=livecd
-
 
248
 
246
# eject CDROM (if CDROM is not on NFS)
249
# source functions of liblinuxlive
-
 
250
. /$MOUNTDIR/live/liblinuxlive
-
 
251
 
-
 
252
# root on NFS?
247
more /proc/cmdline | grep -q "nfsroot="
253
NFSROOT=$( cmdline_value nfsroot )
-
 
254
 
-
 
255
# noeject set?
-
 
256
NOEJECT=$( cmdline_parameter noeject )
-
 
257
 
-
 
258
# eject CDROM 
-
 
259
# if CDROM is not on NFS and if noeject is not set
248
if [ "$?" != "0" ]; then
260
if [ ! $NFSROOT ] && [ ! $NOEJECT ]; then
-
 
261
    CDROM_DEV=$( grep /$MOUNTDIR/live/livecd /proc/mounts | awk '{print $1}' )
249
    echo "Ejecting CD-ROM ..."
262
    echo -n "Ejecting CD-ROM $CDROM_DEV ... "
250
    eject
263
    eject $CDROM_DEV 2>/dev/null || eject
251
    echo
264
    echo
252
fi
265
fi
253
 
266
 
254
if [ "${command##*/}" = "reboot" ]; then
267
if [ "${command##*/}" = "reboot" ]; then
255
  echo "Rebooting."; sleep 1
268
  echo "Rebooting."; sleep 1