All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Sommer <joerg@alea.gnuu.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: Weird environment for usb-storage script?
Date: Wed, 17 Sep 2003 15:55:12 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-106381641323660@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106372115112177@msgid-missing>

begin  "Michael Hale" <michael@halefamilysite.com> wrote:
> Hello,
>
> I am having a problem with my /etc/hotplug/usb/usb-storage script.  As
> you can see below it attempts to start the ssh server and eject the
> cdrom when I insert my usb drive and then stop the ssh server and any
> connections and unject the cdrom when I remove the drive.  The cd pops
> in and out when I remove insert and remove the drive, but nothing
> happens with ssh.  I have run usb-storage from the command line and it
> has the desired behavior, but when hotplug runs the script it doesn't
> start/stop ssh.  Any suggestions?

Maybe the environment is broken.

> #!/bin/sh

exec >/tmp/foo.$$ 2>&1
set -x

> /etc/init.d/ssh start

invoke-rc.d ssh start (would be better, if your system have invoke-rc.d)

> eject
>
> echo "#!/bin/sh" > $REMOVER
> echo "/etc/init.d/ssh stop" >> $REMOVER
> echo "killall -9 sshd" >> $REMOVER
> echo "eject -t" >> $REMOVER

echo '#!/bin/sh
/etc/init.d/ssh stop
killall -9 sshd
eject -t' > $REMOVER

> chmod 777 $REMOVER

Jörg.
end.
-- 
Man(n) sollte nie einer Frau wiedersprechen !
Man(n) sollte immer warten, bis sie es selbst erledigt.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

      reply	other threads:[~2003-09-17 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-16 13:59 Weird environment for usb-storage script? Michael Hale
2003-09-17 15:55 ` Joerg Sommer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-106381641323660@msgid-missing \
    --to=joerg@alea.gnuu.de \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.