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

Punky Tse (spam-protected)
Thu Aug 4 00:57:45 HKT 2011


See /etc/init.d/skeleton for template.

On 4/8/2011 0:30, maciek wrote:
> 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?

-- 

Regards,
Kim-man "Punky" Tse

* Open Source Embedded Solutions and Systems
   - Voyage Linux (http://linux.voyage.hk)
   - Voyage ONE   (http://linux.voyage.hk/voyage-one)
   - Voyage MPD   (http://linux.voyage.hk/voyage-mpd)
* Voyage Store   (http://store.voyage.hk)





More information about the Voyage-linux mailing list