Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 08-30-2004, 01:21 PM   #1
Senior Member
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Rep: Reputation: 138Reputation: 138
Hotplug SCSI scanner or How to write to /proc/scsi/scsi from within a shell script.


I am trying to write the folowing code into a shell script, to enable me to hotplug a scsi scanner, without giving out the root pasword to the users. (Wife and Child)

Code as follows

# A small script to automatically mount the scanner and start xsane.
typeset -i num
num=`cat /proc/scsi/scsi | grep Scanner | wc -l`
if [ $num -eq 1 ]; then
echo "scsi add-single-device 1 0 6 0" > /proc/scsi/scsi

The script runs as root or suid, but when running as suid it will not write to /proc/scsi/scsi permission not granted and I am unable to change the permissions of /proc (for good reason).
Old 08-30-2004, 02:28 PM   #2
Senior Member
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Original Poster
Rep: Reputation: 138Reputation: 138
I've found a solution Thanks anyway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scanner Umax 2200 (USB,SCSI) with AHA2940U scsi card problem in Suse 9.2 Pro nathanv117 SUSE / openSUSE 5 02-22-2005 02:06 PM
SCSI Scanner Hotplug Question failure_man Linux - Hardware 1 10-18-2004 12:17 PM
Error editing /proc/scsi scsi file Thaidog Linux - Newbie 2 08-26-2004 08:19 AM
Some info about '/proc/scsi/scsi' and '/dev' C.Loko Slackware 4 11-27-2003 12:30 PM
allow non root users add devices to /proc/scsi/scsi ? ewto Linux - Newbie 5 10-14-2003 11:36 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration