From 7224c1253228e5c29c78cb3f0f26ce34770f2356 Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Sat, 15 Feb 2014 23:24:26 +0200 Subject: Added ebuilds for kogaion desktop --- app-misc/rogentoslive-tools/files/2/cdeject.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app-misc/rogentoslive-tools/files/2/cdeject.sh (limited to 'app-misc/rogentoslive-tools/files/2/cdeject.sh') diff --git a/app-misc/rogentoslive-tools/files/2/cdeject.sh b/app-misc/rogentoslive-tools/files/2/cdeject.sh new file mode 100644 index 00000000..ae75ae84 --- /dev/null +++ b/app-misc/rogentoslive-tools/files/2/cdeject.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +is_live=$(cat /proc/cmdline | grep cdroot) + +if [ -n "${is_live}" ]; then + cdrom_dev=$(cat /proc/mounts | grep " /mnt/cdrom " | cut -d" " -f 1) + # check if /mnt/cdrom device is a cdrom device + if [ "${cdrom_dev}" = /dev/sr* ] || [ "${cdrom_dev}" = /dev/cdrom* ]; then + eject -mp "${cdrom_dev}" &> /dev/null + fi +fi + -- cgit v1.2.3