[Voyage-linux] Problem with /etc/init.d/rc.local and voyage 0.7.0
lestoilfante
(spam-protected)
Wed May 18 23:43:16 HKT 2011
try to put something in your script that log if your case is executed
instead of control the leds, like "logger whatever_you_want"
On Mon, May 16, 2011 at 7:10 PM, Luca <fush81 at gmail.com> wrote:
> Thanks for the help.
> I have read that document. Now /etc/init.d/rc.firewall starts
> regularly. I have add
>
> case "$1" in "start") instead of case "$1" in "") inside rc.firewall
> script
> ....
> and run the command
> update-rc.d rc.firewall defaults 19.
> I did the same thing for LEDs. I have created a script called rc.leds:
>
>
> #!/bin/sh
> ### BEGIN INIT INFO
> # Provides: Disable leds
> # Required-Start: $remote_fs $syslog
> # Required-Stop: $remote_fs $syslog
> # Default-Start: 2 3 4 5
> # Default-Stop: 0 1 6
> # Short-Description: Script to disable leds
> # Description: This file should be used to construct scripts to be
> # placed in /etc/init.d.
> ### END INIT INFO
>
> case "$1" in
> "start")
> echo 0 > /sys/class/leds/alix\:1/brightness
> echo 0 > /sys/class/leds/alix\:2/brightness
> echo 0 > /sys/class/leds/alix\:3/brightness
> ;;
> "stop")
> echo 1 > /sys/class/leds/alix\:1/brightness
> echo 1 > /sys/class/leds/alix\:2/brightness
> echo 1 > /sys/class/leds/alix\:3/brightness
> ;;
> esac
>
> I put it in /etc/init.d and I gave executable permission before run:
> update-rc.d rc.leds defaults 19
> but after a reboot LEDs remain lit. What's wrong?
>
> --
> Luca F.
>
> 2011/5/16 Punky Tse <punkytse at punknix.com>:
> > Please read:
> > http://www.debian.org/doc/FAQ/ch-customizing.en.html#s-custombootscripts
> >
> > - Punky
> >
> > On 16/5/2011 19:16, Luca wrote:
> >>
> >> Hi all,
> >> I have a little problem with voyage-linux 0.7.0. and my alix 3d3.
> >> This is my /etc/init.d/rc.local
> >> ...
> >> do_start() {
> >> if [ -x /etc/rc.local ]; then
> >> [ "$VERBOSE" != no ]&& log_begin_msg "Running local
> >> boot scripts (/etc/rc.local)"
> >> /etc/rc.local
> >> ES=$?
> >> [ "$VERBOSE" != no ]&& log_end_msg $ES
> >> return $ES
> >> fi
> >> }
> >>
> >> case "$1" in
> >> start)
> >> do_start
> >> mount /dev/sda1 /mnt/scambio -o umask=000
> >> echo 0> /sys/class/leds/alix\:1/brightness
> >> echo 0> /sys/class/leds/alix\:2/brightness
> >> echo 0> /sys/class/leds/alix\:3/brightness
> >> # /etc/init.d/rc.firewall
> >> ;;
> >> restart|reload|force-reload)
> >> echo "Error: argument '$1' not supported">&2
> >> exit 3
> >> ;;
> >>
> >> ....
> >> As you can see I mount a usb pendrive and I turn off LEDs. The problem
> >> is that LEDs do not go off, as if the statement was not executed while
> >> the usb pendrive is mounted correctly. If I enable script for the
> >> firewall (It is now commented) it still does not run at boot. If I run
> >> those commands from the console (after the boot) LEDs go off normally
> >> and the firewall starts normally. What's wrong?
> >>
> >> Thanks in advance.
> >>
> >> --
> >> Luca F.
> >>
> >> _______________________________________________
> >> Voyage-linux mailing list
> >> Voyage-linux at list.voyage.hk
> >> http://list.voyage.hk/mailman/listinfo/voyage-linux
> >
> >
> > --
> >
> > 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)
> >
> >
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.voyage.hk/pipermail/voyage-linux/attachments/20110518/010f8981/attachment-0002.html>
More information about the Voyage-linux
mailing list