Two-state Launcher for CD-ROM drives in Mandrake 9.1

Tobias Kretschmer tobias.kretschmer at epost.de
Mon Feb 2 13:25:58 CET 2004


On Sun, 1 Feb 2004 17:03:45 -0500
"Paul M. Bucalo" <pmbuc at pmbenterprises.com> wrote:

> A while back someone was kind and generous enough to post a
> wonderful script for mounting/unmounting CD-ROM drives using
> XFce's two-state launchers. Here it is for those who aren't aware
> of it:
> 
> #!/bin/sh
> # script to mount/umount cdrom
> # for use with xfce4-trigger-launcher
> if [ "$1" = "1" ]; then
>     mount /mnt/cdrom &> /dev/null
> elif [ "$1" = "0" ]; then
>     eject /mnt/cdrom &> /dev/null
> else
>     STATUS=`grep cdrom /proc/mounts`
>     if [ "x$STATUS" = "x" ]; then
>         echo 0
>     else
>         echo 1
>     fi
> fi
> 
> This script worked perfectly in Red Hat 9, even with the slight 
> modification to the drive numbering to distinguish between the
> CD-ROM and CD-RW drive in that particular box. In Mandrake 9.1,
> the opposite is true. Both launchers show that they are always
> mounted. If I put a CD in, it eventually cycles through the script
> and ejects it back out. The scripts are identical to the ones
> successfully used in Red Hat 9, with only one difference: The
> second ROM drive in the MDK 9.1 box is denoted as '/mnt/cdrom2'
> (instead of '/mnt/cdrom1' in RH 9) by the O/S. 
> 
> Anyone using Xfce-4.0.3.0.1 on Mandrake 9.1, and using this same 
> script with success? Any changes recommended for this distro? If 
> anyone has a better, or just plain working, script for MDK 9.1, 
> *p-l-e-a-s-e* tell me! :0/

Sorry, I can't help you, but I got the same problem on my box,
running Debian 3.0 Woody. Until now I've not been looking into
shell programming, but might try to do so.

Tobias


> TIA,
> 
> Paul
> 
> 
> _______________________________________________
> Xfce mailing list
> Xfce at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce
> http://www.xfce.org





More information about the Xfce mailing list