livecd-tools/tools/eject_cd.sh

12 lines
354 B
Bash
Executable File

#! /bin/sh
#
# eject_cd.sh - openmamba livecd eject CD and halt/reboot script
#
# Copyright (c) 2003-2013 by Silvan Calarco <silvan.calarco@qilinux.it>
# Copyright (c) 2003-2004 by Davide Madrisan <davide.madrisan@qilinux.it>
# FIXME: support SCSI cdroms
CDROMDEV=`cat /etc/mtab | sed -n '/ \/cdrom /{h;s/ .*//p}'`
# eject live CDROM
eject -m $CDROMDEV