Gentoo scripts

Setup for OWFS 2.7p2 by David Babcock


I have been away during Christmas so have just started messing with this again. Upgraded to version 2.7p2 and all I can say is GREAT!!!

Haven't finished my testing. I am using my own script right now, the same one I posted about the reliable startup issues. Great so far!!

I had some sleeps in there between starting the server and filesystem that seemed to help, but might have been a mirage. But what have tested so far is:
Startup script as was: 10 good stop/starts. The hobby-boards 6 channel hub was there every single time started it. No problems.

Removed my sleep commands and suddenly wouldn't umount fs? Was using fusermount cause had some problems earlier as user. But put it back to just umount, Gentoo startup scripts in /etc/init.d are ran by root anyway, so root will be starting/stopping it. But I want user reading/ writing to owfs. Then tested again. 10 good stop/starts

So looks like the updates really made matters so much better. Great job. Final test of the evening I rebooted and owfs came right up and hub was seen. I would also like to test the Gentoo startup script that they made since it is official ebuild now. They are doing it a bit diff and using a different mount point so have to check stuff out and will test it also.


My script is still working fine and tested the Gentoo init.d scripts.
There are couple issues not sure are going to be resolved with them so if you use them here is what you need to do:

  1. There are config files in /etc/conf.d called owserver, owfs and owhttpd that you can use to change your start options. The way it is now the /etc/conf.d/owfs config file won't get used, so do number 2 below.
  2. Change this line in /etc/init.d/owfs
    $«OWHTTPD_OPTS:-m /var/lib/owfs/mnt --allow_other -s»
    $«OWFS_OPTS:-m /var/lib/owfs/mnt --allow_other -s»
    Then /etc/conf.d/owfs will be used and you can change your options. The rest of the line above is just in case you don't have anything in the /etc/conf.d config files. But I believe they came with default options and aren't blank.
  3. You also HAVE TO add owfs to the uucp group if using serial OR add owfs to the usb group if using usb. ie:
    Serial devices (/dev/ttyS*): # gpasswd -a owfs uucp
    USB devices (/proc/bus/usb): # gpasswd -a owfs usb
    Or you will get permission denied, even if the User is in the owfs and uucp or usb group. Check your syslog for errors to see what is happening when start owserver.

I'm not using Gentoo scripts as they are, I want mine owned by <user>:owfs, so used the fuse option: --fuse_open_opt= to change it. But you still have to have to use the --allow_other or you can't access it, cause root starts the init.d scripts.
I have not been successful adding this option to the /etc/conf.d/owfs config file. I have to add it to the /etc/init.d/owfs script itself and because this option only takes numbers you can't use the variables the script uses. So if you want
the mountpoint owned by user:owfs add these to the /etc/init.d/owfs file:

  1. Add these two variable below the other variables at the top (change OWFSUID to your userid. Type in 'id' without the quotes and you can see the id numbers):
  2. Then insert this line: --fuse_open_opt="\"-o uid=$OWFSUID,gid=$OWFSGID\"" \ in the 'start' section of the script so it looks like this:
    --background --error_print 3 \
    --fuse_open_opt="\"-o uid=$OWFSUID,gid=$OWFSGID\"" \
    $«OWFS_OPTS:-m /var/lib/owfs/mnt --allow_other -s»

    Note: --error_print default is 1, you can change it to 3 to get more verbose error messages in syslog. And I changed my owfs mountpoint in /etc/conf.d/owfs to /mnt/wire .
    Save the changes and stop/start /etc/init.d/owfs and if no errors the owfs mountpoint should be owned by <user>:owfs and not root:root .

Previous page: Gentoo
Next page: Bonjour (zeroconf)