Update: Nicer rc scripts
Malcolm
malcolm.parsons at gmail.com
Sun Apr 8 21:08:18 CEST 2007
On 4/8/07, Benjamin Tomos Lewis <ben.tc1415 at gmail.com> wrote:
> Owing to a bug (lack of exit 0 in rc.common) and Ben forgetting what &
> does in a shell script, here is a fixed rcscript.diff.
Still has whitespace changes:
- echo "Creating default /etc/passwd"
- echo "root:xxSVJVBe8UDn2:0:0:Guybrush:/home:/bin/sh" > /etc/passwd
- echo "bin:x:1:1:bin:/bin:" >> /etc/passwd
- echo "daemon:x:2:2:daemon:/sbin:" >> /etc/passwd
- echo "nobody:x:99:99:Nobody:/:" >> /etc/passwd
+ echo "Creating default /etc/passwd..."
+ echo "root:xxSVJVBe8UDn2:0:0:Guybrush:/home:/bin/sh" > /etc/passwd
+ echo "bin:x:1:1:bin:/bin:" >> /etc/passwd
+ echo "daemon:x:2:2:daemon:/sbin:" >> /etc/passwd
+ echo "nobody:x:99:99:Nobody:/:" >> /etc/passwd
+ rchelper 0
- if [ "$__network_up" = "YES" ]
- then
- /etc/rc.d/telnetd start
- else
- echo "Not starting telnetd: network is down"
- fi
+ if [ "$__network_up" = "YES" ]
+ then
+ /etc/rc.d/telnetd start
+ else
+ echo "Starting telnetd..."
+ rchelper $?
+ echo " Network down."
+ fi
and an &:
+ echo "Bringing up loopback interface..."
+ ifconfig lo up & rchelper $?
and is the nanox script supposed to be included?
--
Malcolm Parsons
More information about the dslinux-devel
mailing list