Date: Fri, 30 Apr 2010 12:19:54 +0200 (CEST) From: Marco Beishuizen <mbeis@xs4all.nl> To: Warren Block <wblock@wonkity.com> Cc: freebsd-questions@freebsd.org Subject: Re: Using a scanner (USB) as user and not as root Message-ID: <alpine.BSF.2.00.1004301215400.2529@yokozuna.lan> In-Reply-To: <alpine.BSF.2.00.1004291600380.26199@wonkity.com> References: <alpine.BSF.2.00.1004281939070.3115@yokozuna.lan> <20100428182223.GA34355@slackbox.erewhon.net> <alpine.BSF.2.00.1004282057490.3115@yokozuna.lan> <alpine.BSF.2.00.1004281310520.23838@wonkity.com> <alpine.BSF.2.00.1004292210410.2406@yokozuna.lan> <alpine.BSF.2.00.1004291437530.25778@wonkity.com> <alpine.BSF.2.00.1004291529320.25778@wonkity.com> <alpine.BSF.2.00.1004292346070.2406@yokozuna.lan> <alpine.BSF.2.00.1004291600380.26199@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Apr 2010, Warren Block wrote: > On Thu, 29 Apr 2010, Marco Beishuizen wrote: > >> On Thu, 29 Apr 2010, Warren Block wrote: >> >>> One more problem: there should be a quote at the end of the last line. >>> >>> attach 100 { >>> device-name "ugen[0-9].[0-9]"; >>> match "vendor" "0x04b8"; >>> match "product" "0x010a"; >>> action "usb_devaddr=`echo $device-name | sed 's#^ugen##'` && \ >>> chown root:saned /dev/usb/${usb_devaddr}.* && \ >>> chmod 0660 /dev/usb/${usb_devaddr}.*" >> >> Shouldn't there be a ; at the end of the action line also? Because every >> line above ends with it too. I also ended the total attach 100 statement >> with }; because that seems the case in the rest of devd.conf. > > Yes, sorry about that. Next time I'm going to post the whole section instead > of trying to edit it down. > >> To see if these changes work I'll have to reboot later because I'm updating >> my ports, and this can take a while... > > There's '/etc/rc.d/devd restart', but it's probably not something to > experiment with during updates. After the changes in devd.conf the scanner now works as user! It has the user as owner and saned as group. Thanks for the help. Regards, Marco -- The Poems, all three hundred of them, may be summed up in one of their phrases: "Let our thoughts be correct". -- Confucius
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1004301215400.2529>