[Voyage-linux] /etc/init.d and start & stop scripts problem

maciek (spam-protected)
Thu Aug 4 00:30:21 HKT 2011


voyage 0.7.5

I`ve put script in /etc/init.d/automount.sh which mount usb flash memory.

code:

#!/bin/sh

### BEGIN INIT INFO
# Provides:          mount usb
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: mount usb
### END INIT INFO

if [ -e /dev/sda1 ];then
mount -t vfat /dev/sda1 /var/usbflash -o defaults,rw,umask=0
fi


# insserv automount.sh


Problem:

Script is executed when:
1. start system - OK
2. reboot system - WRONG because is executed when system is going down and
when system is starting !

I want to put it as last starting script (which mount /dev/sda1), and put it
as first starting script (which umount /dev/sda1). How to do it?












v o i p t e l e . n e t , dzwon najtaniej jak to mozliwe
e r a u r . c o m , rozwiazania internetowe dla firm i klientow indywidualnych




More information about the Voyage-linux mailing list