~gandelman-a/ubuntu/oneiric/scsitools/mergeproposal

« back to all changes in this revision

Viewing changes to scsidev/boot.scsidev

  • Committer: Bazaar Package Importer
  • Author(s): Eric Delaunay
  • Date: 2004-06-25 00:59:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040625005911-i79gju5vgdxcqd7c
Tags: 0.7-2
* Fixed scsiformat bug.  Closes: #251426.
  Thanks to Erik Mouw <erik@harddisk-recovery.com> for providing a patch.
* Fixed not detected removable devices in scsiinfo.  Closes: #255715.
* Added italian template translations.  Closes: #251740.
* Renamed ca_ES.po to ca.po as there is no need in specifying a country part
  for the Catalan language.  Closes: #255875.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# Copyright (c) 2002 SuSE GmbH Nuernberg, Germany.  All rights reserved.
 
4
# License: GNU GPL.
 
5
#
 
6
# /etc/init.d/boot.scsidev
 
7
#
 
8
### BEGIN INIT INFO
 
9
# Provides:          boot.scsidev
 
10
# Required-Start:    boot.proc
 
11
# Required-Stop:
 
12
# Default-Start:     B
 
13
# Default-Stop:
 
14
# Short-Description: set up /dev/scsi/ 
 
15
# Description:       scsidev creates persistent device nodes
 
16
#       in /dev/scsi/ even if your SCSI config changes.
 
17
### END INIT INFO
 
18
 
 
19
. /etc/rc.status
 
20
test -r /etc/sysconfig/scsidev || exit 6
 
21
. /etc/sysconfig/scsidev
 
22
 
 
23
SCSIDEV_BIN=/bin/scsidev
 
24
test -x $SCSIDEV_BIN || exit 5
 
25
 
 
26
test "$SCSIDEV_ARGS" = "disable" && exit 0
 
27
 
 
28
rc_reset
 
29
case "$1" in 
 
30
    start|try-restart|restart|force-reload|reload)
 
31
        unset RW
 
32
        if test -r /proc/mounts; then
 
33
                RW=`sed '/^rootfs/d;s/^[^ ]\+ \/ [^ ]\+ \([^ ]\+\).*$/\1/p;d' </proc/self/mounts`
 
34
        fi      
 
35
        echo -n "Scanning SCSI devices and filling /dev/scsi/ "
 
36
        if [ "$RW" != "rw" ]; then
 
37
                mount -o remount,rw /
 
38
        fi
 
39
        $SCSIDEV_BIN $SCSIDEV_ARGS
 
40
        rc_status -v
 
41
        if [ "$1" = "start" -a "$RW" != "rw" ]; then
 
42
                mount -o remount,ro /
 
43
        fi
 
44
        ;;
 
45
    stop)
 
46
        #rc_failed 3
 
47
        #rc_status -v
 
48
        ;;
 
49
    status)
 
50
        rc_failed 4
 
51
        rc_status -v
 
52
        ;;
 
53
    *)
 
54
        echo "Usage: $0 start|restart"
 
55
        exit 1
 
56
        ;;
 
57
esac
 
58
 
 
59
rc_exit
 
60