Hehe, evo moje prve, jednostavne skripte, ali koja radi ;) (ne mogu da instaliram HAL)
Code:
#!/bin/bash
# A script which will eject/insert CDrom tray, please mount CDrom as ordinary user*
# and download eject system from http://sourceforge.net/projects/eject or with command
# "emerge eject" on Gentoo ;)
# by Avram, www.avramovic.info
#define where CDrom is mounted by default (only this you can edit)
CD_ROM=/mnt/cdrom
#check whether CDrom is mounted
MOUNTED=`mount|grep "$CD_ROM"`
if [ "$MOUNTED" ]
then
#if string is not empty, CDrom is mounted, so we eject it (will unmount automatically)
echo "Ejecting CDrom..."
eject "$CD_ROM"
else
#if string is empty then there is no CDrom mounted, so we mount it
echo "Mounting CDrom..."
mount "$CD_ROM"
fi
# * - you need "user" placed for cdrom in /etc/fstab. then mount with "mount /mnt/cdrom"
#eof
[Ovu poruku je menjao JaHvram dana 14.05.2006. u 12:27 GMT+1]
Laravel Srbija.
[NE PRUŽAM PODRŠKU ZA PHP PREKO PRIVATNIH PORUKA!]