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