#!/bin/sh clear basedev=$(cat /run/mgalive/basedev) if strstr "$basedev" "/dev/sr" ; then eject $basedev echo "It is now safe to remove the Live medium" echo "Press to continue..." read -t 30 a fi return 0