On Sun, 2006-01-15 at 10:25 +0100, Kern Sibbald wrote: > I think you can do things much more simply by using groups and possibly > tweaking udev, then you won't need to change things back and forth. > Personally, I took a big hammer to my udev for both the tape drive and the > control channel. I created a > /etc/udev/rules.d/40-kerns.rules that contains: > > > # Devices used by Kern > KERNEL="hiddev*", NAME="usb/hiddev%n" > KERNEL=="ttyS*", OWNER="kern",GROUP="uucp", MODE="0660" > KERNEL=="st*", OWNER="kern",GROUP="disk", MODE="0640" > KERNEL=="sg*", OWNER="kern",GROUP="disk", MODE="0640" > KERNEL=="nst*", OWNER="kern",GROUP="disk", MODE="0640" > > I imagine from that you should be able to figure out how to ensure the > devices > are created with the permissions you want ... > > --
I like the "big hammer" approach because it's fast. But a bulk change will cause other problems as well. Most of the hardware I'm using is Exabyte/Ecrix. They have release some linux tools that can locate and configure their hardware very easily. The libTool -S will search the scsi chain for autochangers by them and report their sg* device. They also have a vxaTool that will do the same. Since the sd.conf will have the devices listed, it's a relatively easy process to parse it for the needed devices and use the user and group setting in the init to make the change. The switch back is mostly for completeness (put things back when I'm done). Instead of storing the setting, parsing the udev rules would be best. But for testing, I've used the Big Hammer method :) -- James P. Kinney III \Changing the mobile computing world/ CEO & Director of Engineering \ one Linux user / Local Net Solutions,LLC \ at a time. / 770-493-8244 \.___________________________./ http://www.localnetsolutions.com GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics) <[EMAIL PROTECTED]> Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
signature.asc
Description: This is a digitally signed message part