Re: Autorun works


Subject: Re: Autorun works
From: James Zuelow (e5z8652@zuelow.net)
Date: Tue Jun 11 2002 - 20:13:10 AKDT


On Tue, 11 Jun 2002 09:54:23 -0800
"Mike Barsalou" <mbarsalou@aidea.org> wrote:

>
> You can make the script do anything you want it to as far as I can tell.
> Remember it will run as the user that you are logged in as.
>
> Not really sure if it is RedHat specific or not. It could have to do with
> autofs. Anyone else want to try and figure out what is needed on a
> non-RedHat distro?
>
> I am running Gnome here.
>
> Mike
>
My systems use /cdrom and /floppy instead of /mnt/... or /media/... (or I guess /vol/... is an old Unix standard as well). Since this information is in fstab, it should not be hard to find:

CDMNT=`awk '/(cdrom|cd0)/ { print $2 }' /etc/fstab`
$CDMNT/Linux/setup

should do it unless the user puts the CD into a second CD drive.

After inspecting my home systems, I'd say you also have to pay attention to CD's being mounted noexec. On my Debian systems, I had to specifically put exec into fstab to get the installer to run. The options were originally set to: defaults, ro, user, noauto. According to man mount, the user option implies noexec, so exec needs to be specifically enabled.

Although I guess if the CD was mounted noexec a script would not run in the first place, so you could ignore testing for exec/noexec mounts. :) (Just don't make promises that it will always run the installer from CD.)

Cheers,

James

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Tue Jun 11 2002 - 20:13:20 AKDT