LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   rc.scanluns in Current (https://www.linuxquestions.org/questions/slackware-14/rc-scanluns-in-current-478611/)

shepper 08-29-2006 08:25 PM

rc.scanluns in Current
 
Pat has added a new boot script in rc.d that I believe is suppose to add usb/firewire based devices at boot and it has executable permission right off the bat at install. For me it just scans for new devices and since I don't have any it does not create any new devices.

Quote:

#!/bin/sh
#
# rc.scanluns (Wed Jul 26 16:55:51 CDT 2006) pjv
#
# This script simply runs "rescan-scsi-bus -l" to look for devices
# that have been plugged into a USB or IEEE1394 (Firewire) port that
# might not have been detected because they use a LUN (Logical Unit
# Number) other than 0.
#
# You might need to run this script again (or just use
# rescan-scsi-bus directly at the command line) after plugging
# in new devices such as USB cameras, music players, external
# storage, and similar items.

# Run this only if "noscanluns" was NOT given as a kernel option.
if ! grep -qw noscanluns /proc/cmdline ; then
if [ -x /sbin/rescan-scsi-bus ]; then
echo "Scanning all LUNs for additional hardware: /sbin/rescan-scsi-bus -l"
/sbin/rescan-scsi-bus -l
fi
fi
I added the noscanluns kernel boot option to decrease my boot time (worked) but I wonder why it one just doesn't chmod 644 rc.scanluns as is done for all the other boot scripts?

Bruce Hill 08-30-2006 12:33 AM

I think the proper thing is to issue "chmod -x /etc/rc.d/rc.scanluns"

shepper 08-30-2006 08:22 AM

Bruce,

I notice you are also running current. Have you removed executable permissions for rc.scanluns and if so are you having any problems?

I have had not problems with passing the noscanluns option at boot.

Bruce Hill 08-30-2006 10:06 AM

Quote:

Originally posted by shepper:
Have you removed executable permissions for rc.scanluns and if so are you having any problems?

I have had not problems with passing the noscanluns option at boot.
I did try "chmod -x /etc/rc.d/rc.scanluns" and it doesn't probe
for luns while booting.

However, Alien Bob explained to me why you don't just change the perms:
Quote:

You should not "chmod -x" that script. If you do, the issue of "noscanluns" boot option becomes non-existent. The problem you don't yet see is when someone boots the computer and something breaks because of the rc.scanluns. Instead of getting a Knoppix CD and fixing the X bit of rc.scanluns, you can simply pass "noscanluns" on the lilo prompt. Just like you can pass "nousb" or "nohotplug". It is meant to help computers boot that otherwise wouldn't - without having to resort to rescue CD's.
I haven't had problems with it probing luns. And fwiw, I had 3 USB
devices plugged in when I installed -current, and let it create
mount points for them.

The issue I did have is that "mount -a" is passed during bootstrapping
before "hotplug" or "rcscanluns" so they don't get mounted. Pat said:
Quote:

We're looking into ways to make that happen automatically, but that involves some additional components that won't make it into Slackware 11.0.

MannyNix 08-30-2006 03:41 PM

Quote:

getting a Knoppix CD and fixing the X bit ...
Why? Why not the Slackware CD? Is the breakage that bad?

Alien Bob 08-31-2006 01:33 AM

Quote:

Originally Posted by mannyslack
Why? Why not the Slackware CD? Is the breakage that bad?

Figure of speech. A knoppix CD stands for "rescue CD" but generally any bootable Linux CD - including the Slackware CD - will do of course.

Eric


All times are GMT -5. The time now is 09:26 PM.