Re: [Server-devel] usbmount alternatives
On Thu, Nov 22, 2012 at 11:20 AM, Tony Anderson tony_ander...@usa.net wrote: The Community XS is being mounted on Fedora. Adam reports the Fedora does not support usbmount. I'd be interested in confirming that usbmount is now unusable and unfixable on Fedora, if that is what is being suggested. Can anyone provide technical details? Thanks Daniel ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
Re: [Server-devel] usbmount alternatives
On Mon, 2012-11-26 at 11:24 -0600, Daniel Drake wrote: On Mon, Nov 26, 2012 at 11:22 AM, Jerry Vonau jvo...@shaw.ca wrote: On Mon, 2012-11-26 at 08:23 -0600, Daniel Drake wrote: Think the issue might be that a list (sda sda1) of character files is passed by udev but usbmount doesn't test if it's a block device before trying to mount, then failing and bailing if the first device in the list doesn't mount. sda and sda1 will never be character devices, always block. It may try sda first, but I don't think that is something new. OK a list of files found in /dev then, why would anybody try to mount sda if sda1 is present? I can see trying to mount sda if there was no partition table present, but if there is a table why try? It's going to fail. Doesn't matter, there are acceptable replacements for that functionality, just another package that's not part of Fedora that won't need to be maintained going forward. Jerry ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
Re: [Server-devel] usbmount alternatives
On Wed, Nov 21, 2012 at 8:35 PM, Holt h...@laptop.org wrote: George/Daniel/Tony/Jerry, Was there a conclusion here, if any? I'm still waiting for someone to write here explaining what exactly the problem is with usbmount. Thanks Daniel ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
Re: [Server-devel] usbmount alternatives
George/Daniel/Tony/Jerry, Was there a conclusion here, if any? On 11/13/2012 10:45 AM, Tony Anderson wrote: On 11/12/2012 07:47 PM, Anna wrote: Just throwing this out, but incron might be something to look into. For example, I've set up root's incrontab so that if a specific file is modified, a script automatically runs with root permissions. You could set root's incrontab up to watch /run/media/olpc/ and when a directory is created there (i.e. any USB drive is automounted), incron would call your script and run it as root. Again, just brainstorming here. I won't be offended if someone says that's a terrible idea. Anna Schoolfield Birmingham On Mon, Nov 12, 2012 at 6:09 PM, Adam Holt h...@laptop.org mailto:h...@laptop.org wrote: Thanks Tony..adding a couple others involved too :) On 11/12/2012 6:59 PM, Tony Anderson wrote: Hi, First, usbmount is the software that mounts a removable drive. So I would think Fedora is replacing it with an alternative (some software has to perform that function). CentOS is still using usbmount. Usbmount provided for a script to be installed by the administrator that would be run whenever a removable drive was mounted. Daniel Drake uses this to execute a series of XS specific scripts (these scripts were developed for OLE Nepal and are not in XS-0.7). The scripts he developed for OLE Nepal look at the mounted drive and checks for the presence of specific folders. If these folders are present then a corresponding script is executed. So there are two approaches going forward: 1. Implement the capability on the usbmount replacement. 2. Execute a script via ssh from an XO, a url, or even direct access for a school server on the teacher's XO. I am planning to use a 'generic script' on the server: if [ -f $UM_MOUNTPOINT/XC/xc-install ]; then log notice Installing XC cd $UM_MOUNTPOINT/XC if bash xc-install; then log notice XC installed successfully else log notice XC install failed with code $? error_beep fi fi Essentially it tests whether the drive has a folder XC with a file xc-install., if so it is executed. If not, nothing happens. The xc-install script is on the mounted drive and does whatever is needed. XC is the counterpart to XO and XS and refers to the content for the school server (XS being the software). This isn't hard and fast. The XC script can (and does) add packages (e.g. mediawiki or django) not in XS-0.7. Of course, it can also change the server configuration. The script needs to be run with root privileges. In Sridhar's scenario this could be a bit tricky. I set up the school server for login by admin by password and su to root (requiring another password). This works well when you have itinerant technical support who may need to administer school servers at many different sites. If a teacher is to accomplish this, it would probably be easiest to arrange for the teacher to login via a public/private key pair and be given root privileges. It would be relatively easy to give the teacher's laptop a special menu line in the XO icon or in the console so that no command line interface would be needed. Essentially I am doing this sort of change with a script which works after the XO install (it could, of course, also be baked into the build). In the latter case, all of the laptops would have the extra menu line so the school server could be configured only to accept the teacher's click (e.g. identify teacher by serial-number so that only the teacher's public key would match). Tony -- Help kids everywhere map their world, at http://olpcMAP.net ! ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
[Server-devel] usbmount alternatives
On 11/12/2012 07:47 PM, Anna wrote: Just throwing this out, but incron might be something to look into. For example, I've set up root's incrontab so that if a specific file is modified, a script automatically runs with root permissions. You could set root's incrontab up to watch /run/media/olpc/ and when a directory is created there (i.e. any USB drive is automounted), incron would call your script and run it as root. Again, just brainstorming here. I won't be offended if someone says that's a terrible idea. Anna Schoolfield Birmingham On Mon, Nov 12, 2012 at 6:09 PM, Adam Holt h...@laptop.org mailto:h...@laptop.org wrote: Thanks Tony..adding a couple others involved too :) On 11/12/2012 6:59 PM, Tony Anderson wrote: Hi, First, usbmount is the software that mounts a removable drive. So I would think Fedora is replacing it with an alternative (some software has to perform that function). CentOS is still using usbmount. Usbmount provided for a script to be installed by the administrator that would be run whenever a removable drive was mounted. Daniel Drake uses this to execute a series of XS specific scripts (these scripts were developed for OLE Nepal and are not in XS-0.7). The scripts he developed for OLE Nepal look at the mounted drive and checks for the presence of specific folders. If these folders are present then a corresponding script is executed. So there are two approaches going forward: 1. Implement the capability on the usbmount replacement. 2. Execute a script via ssh from an XO, a url, or even direct access for a school server on the teacher's XO. I am planning to use a 'generic script' on the server: if [ -f $UM_MOUNTPOINT/XC/xc-install ]; then log notice Installing XC cd $UM_MOUNTPOINT/XC if bash xc-install; then log notice XC installed successfully else log notice XC install failed with code $? error_beep fi fi Essentially it tests whether the drive has a folder XC with a file xc-install., if so it is executed. If not, nothing happens. The xc-install script is on the mounted drive and does whatever is needed. XC is the counterpart to XO and XS and refers to the content for the school server (XS being the software). This isn't hard and fast. The XC script can (and does) add packages (e.g. mediawiki or django) not in XS-0.7. Of course, it can also change the server configuration. The script needs to be run with root privileges. In Sridhar's scenario this could be a bit tricky. I set up the school server for login by admin by password and su to root (requiring another password). This works well when you have itinerant technical support who may need to administer school servers at many different sites. If a teacher is to accomplish this, it would probably be easiest to arrange for the teacher to login via a public/private key pair and be given root privileges. It would be relatively easy to give the teacher's laptop a special menu line in the XO icon or in the console so that no command line interface would be needed. Essentially I am doing this sort of change with a script which works after the XO install (it could, of course, also be baked into the build). In the latter case, all of the laptops would have the extra menu line so the school server could be configured only to accept the teacher's click (e.g. identify teacher by serial-number so that only the teacher's public key would match). Tony -- Help kids everywhere map their world, at http://olpcMAP.net ! ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
Re: [Server-devel] usbmount alternatives
Hi Daniel, Can you tell me what plans there are for the XS beyond version 0.7 and who would be undertaking them. Thanks, Tim -- From: Daniel Drake d...@laptop.org Sent: Tuesday, November 13, 2012 9:05 AM This should be discussed on server-devel. I'd be happy to advise on any usbmount issues reported there. Thanks Daniel ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel