ed...@pettijohn-web.com (Edgar Pettijohn), 2017.04.23 (Sun) 23:59 (CEST):
> I'm working on a gui tool for mounting usb sticks. I want it to launch from
> hotplugd, but so far I am unsuccessful.
>
> #/etc/hotplug/attach
>
> #!/bin/sh
>
> DEVCLASS=$1
>
> DEVNAME=$2
>
>
> case $DEVCLASS in
>
Hello,
Is it in french but you can take an eye on it:
https://obsd4a.net/wiki/doku.php?id=system:hotplug-diskmount
here the sh script:
#!/bin/sh
DEVCLASS=${1}
DEVNAME=${2}
LOGIN="id_user"
case "${DEVCLASS}" in
2)
/usr/local/libexec/hotplug-diskmount attach -u "${LOGIN}" -m
I was thinking the script would inherit the users environment. Which isn't the
case. :( I think there are a few ways to work around this. I just suck at shell
scripting, so I guess I'll get some practice.
On Apr 23, 2017, 11:13 PM, at 11:13 PM, Jan Lambertz
wrote:
Hi,
i am not sure that the hotplug scripts are executed by the system user of
the person that is sitting in front of the Computer. So, no rights to files
or no display can be a Problem. How can the Computer know how inserted that
device ?
I'm working on a gui tool for mounting usb sticks. I want it to launch
from hotplugd, but so far I am unsuccessful.
#/etc/hotplug/attach
#!/bin/sh
DEVCLASS=$1
DEVNAME=$2
case $DEVCLASS in
2)
/usr/local/bin/xmount.py /dev/"$DEVNAME"a
;;
esac
The script is
5 matches
Mail list logo