DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 8th January 2013
GullibleJones GullibleJones is offline
Port Guard
 
Join Date: Sep 2008
Posts: 13
Thanked 0 Times in 0 Posts
Cool Getting hotplugd to work

I'm trying to make OpenBSD automount USB and optical media, so that I don't have to bother with kern.usermount and associated insecurity. Because I'm trying to keep things simple and avoid using regexps, I just want to mount stuff by device name.

My /etc/hotplug/attach file looks like this:

Code:
#!/bin/sh

DEVCLASS=$1
DEVNAME=$2

case $DEVCLASS in
2) # disk devices
        case $DEVNAME in
        sd1) # USB drives
                mount -o nodev,nosuid /dev/sd1i /mnt/flash
                ;;
        cd0) # CD drives
                mount -o nodev,nosuid /dev/cd0a /mnt/optical
                ;;
        esac
esac
This mounts the USB drive, but keeps it read-only for limited users. It never mounts optical media.

How can I get it to mount a CD or DVD? And what's the best way to apply sane permissions to the USB drive, without changing the permissions on the device node?

Edit: okay, major "Duh" moment on the USB permissions problem. The solution is to make the mount directory writeable by whoever needs to write to it.

Still haven't figured out the CD drive though.

Last edited by GullibleJones; 8th January 2013 at 10:01 PM. Reason: One problem solved.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
why won't my table work? tomp OpenBSD Security 3 25th August 2011 12:23 PM
nspluginwrapper not work... marduk NetBSD Installation and Upgrading 4 3rd January 2011 10:23 PM
ATI Catalyst.... Does it work? echoblack OpenBSD Installation and Upgrading 10 17th June 2009 09:04 AM
Crossplatform UI Work Turophile Programming 9 21st October 2008 11:56 PM
Getting Qt4 to work on FreeBSD enpey FreeBSD Ports and Packages 6 6th May 2008 07:20 AM


All times are GMT. The time now is 02:07 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick