? bufix.c Index: Makefile.in =================================================================== RCS file: /home/cvsroot/scsidev/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Makefile.in 2000/01/17 11:33:02 1.7 +++ Makefile.in 2000/02/14 22:54:03 1.8 @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.7 2000/01/17 11:33:02 garloff Exp $ +# $Id: Makefile.in,v 1.8 2000/02/14 22:54:03 garloff Exp $ # ## Makefile for scsidev. @@ -24,8 +24,8 @@ bindir = $(exec_prefix)/bin # Where to put the manual pages. -#mandir = $(prefix)/share/man/man8 -mandir = $(prefix)/man/man8 +mandir = $(prefix)/share/man/man8 +#mandir = $(prefix)/man/man8 # Extension (not including `.') for the manual page filenames. manext = 8 Index: README =================================================================== RCS file: /home/cvsroot/scsidev/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- README 2000/01/16 21:41:31 1.1 +++ README 2000/02/14 22:54:03 1.2 @@ -1,4 +1,6 @@ -# $Id: README,v 1.1 2000/01/16 21:41:31 garloff Exp $ +# $Id: README,v 1.2 2000/02/14 22:54:03 garloff Exp $ +NOTE: This docu is out of date. Please refer to the man page and the +===== web page mentioned there. KG. The linux SCSI code assigns minor numbers to devices dynamicly. Thus if you add or remove a device, the device numbering will change, and this Index: TODO =================================================================== RCS file: /home/cvsroot/scsidev/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TODO 2000/01/28 00:20:03 1.1 +++ TODO 2000/02/14 22:54:03 1.2 @@ -1,7 +1,8 @@ -TODO ($Id: TODO,v 1.1 2000/01/28 00:20:03 garloff Exp $) +TODO ($Id: TODO,v 1.2 2000/02/14 22:54:03 garloff Exp $) ==== * Update manpage (-r option, sparse cfg) +* Update README file. * Scan differently ... - First all sgs => number of disks, tapes, cdroms - Tapes: Those are safe! Index: VERSION =================================================================== RCS file: /home/cvsroot/scsidev/VERSION,v retrieving revision 1.3 retrieving revision 1.5 diff -u -r1.3 -r1.5 --- VERSION 2000/01/18 20:35:06 1.3 +++ VERSION 2000/02/14 22:58:32 1.5 @@ -1 +1 @@ -2.1 +2.10 Index: boot.diff =================================================================== RCS file: /home/cvsroot/scsidev/boot.diff,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- boot.diff 2000/01/17 11:23:11 1.2 +++ boot.diff 2000/02/14 22:54:03 1.3 @@ -1,14 +1,6 @@ -# DIFF file to demonstrate using the scsidev utility at boot time -# handling fstabs with /dev/scsi references. Note that my root fs is -# on an IDE disk, so I don't need an INITRD. -# You absolutely need grep available at boot time. I just copied -# it into /bin/grep. -# The diff is against a hacked SuSE 6.2 /sbin/init.d/boot script. -# It won't apply cleanly against yours, but it gives you an idea. -# Kurt Garloff , 2000/01/17 ---- boot.orig Mon Jan 17 00:20:54 2000 -+++ boot Mon Jan 17 12:11:36 2000 -@@ -39,6 +39,25 @@ +--- /sbin/init.d/boot.orig Thu Jan 20 11:20:25 2000 ++++ /sbin/init.d/boot Mon Feb 14 23:44:26 2000 +@@ -33,6 +33,25 @@ echo -e "$ECHO_RETURN" fi @@ -19,7 +11,7 @@ +# +# NOTE: grep needs to be available, i.e. reside in /bin !!! +# -+if test -x /bin/scsidev -a ! -z "`grep /dev/scsi /etc/fstab`"; then ++if test -x /bin/scsidev -a test -x /bin/grep -a ! -z "`grep /dev/scsi /etc/fstab`"; then + HAVE_DEVSCSI_RAM3=1 + ECHO_RETURN=$rc_done_up + echo "Setting up SCSI devices ..." @@ -27,17 +19,20 @@ + mke2fs -q -F -i1024 -g4096 /dev/ram3 512 + test -d /dev/scsi || mkdir /dev/scsi + mount /dev/ram3 /dev/scsi -+ /bin/scsidev -q || ECHO_RETURN=$rc_failed_up ++ /bin/scsidev -r -q || ECHO_RETURN=$rc_failed_up + echo -e "$ECHO_RETURN" +fi + - # # maybe we use "Multiple devices". So initialize MD. -@@ -163,6 +182,22 @@ - # Breakpoint 2 - test -z "$BREAK2" || eval $BREAK2 + # +@@ -222,6 +241,27 @@ + fi + fi ++# If scsidev created a ramdisk for /dev/scsi, it's now time to ++# remove it: / is writeable now. ++# In order to prevent trouble, swap needs to be turned off before +if test -x /bin/scsidev -a ! -z "$HAVE_DEVSCSI_RAM3"; then + ECHO_RETURN=$rc_done_up + echo "Cleaning /dev/scsi ..." @@ -48,25 +43,28 @@ + umount /dev/scsi || unset HAVE_DEVSCSI_RAM3 +fi +if test -x /bin/scsidev; then -+ /bin/scsidev -q ++ /bin/scsidev -r -q +fi +if test ! -z "$NEED_SWAPON_AGAIN"; then + swapon -a + unset NEED_SWAPON_AGAIN +fi - ++# ramdisk will be freed later, when /usr is mounted. ++ # - # initialize database for kerneld. This should be done earlier, but -@@ -243,6 +278,12 @@ - #/sbin/ldconfig -X 2>/dev/null || ECHO_RETURN=$rc_failed - #echo -e "$ECHO_RETURN" + # Mount local filesystems in '/etc/fstab' (and create an entry + # for / and /proc). +@@ -301,6 +341,13 @@ + { echo ; echo -e "ldconfig $rc_failed" ; } ; } & + echo -e "$ECHO_RETURN" } + ++# Now finally remove the scsidev ramdisk to free some memory +if test ! -z "$HAVE_DEVSCSI_RAM3"; then + echo "Free /dev/scsi ramdisk" + freeramdisk /dev/ram3 + unset HAVE_DEVSCSI_RAM3 -+fi ++fi - # Breakpoint 4 - test -z "$BREAK4" || eval $BREAK4 + # + # Let zic set timezone - if present. Index: scsidev.8 =================================================================== RCS file: /home/cvsroot/scsidev/scsidev.8,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- scsidev.8 2000/01/28 12:22:45 1.8 +++ scsidev.8 2000/02/14 22:54:03 1.9 @@ -1,8 +1,8 @@ # -# $Id: scsidev.8,v 1.8 2000/01/28 12:22:45 garloff Exp $ +# $Id: scsidev.8,v 1.9 2000/02/14 22:54:03 garloff Exp $ # .\" -*- nroff -*- -.TH SCSIDEV 25 "January 2000" "Version 2.00" +.TH SCSIDEV 25 "January 2000" "Version 2.10" .SH NAME scsidev \- populate /dev/scsi with device names that are independent of reconfiguration. .SH SYNOPSIS