Code: Select all
#!/bin/bash
# /etc/init.d/usbboot
### BEGIN INIT INFO
# Provides: USB Secure Booting
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start 2 3 4 5
# Default-Stop: 0 1 6
#END INIT INFO
id="USB ID HERE"
case "$1" in
start)
if [ -z 'lsusb | grep "$id"' ]
then
echo "USB Key Not Found"
else
echo "USB Key Found"
fi
;;
stop)
;;
*)
echo "Usage /etc/init.d/usbboot {start|stop}"
exit 1
;;
esac
exit 0