fs

morpheus filesystem files
git clone git://git.2f30.org/fs
Log | Files | Refs

commit b55e3bbb30ae526fced67006413411cc96ef232a
parent e6d3d6af017ff338919dc97a546462f11eb22196
Author: sin <sin@2f30.org>
Date:   Tue, 17 Sep 2013 14:31:32 +0100

Move /etc/netstart to /etc/rc.d/network

Diffstat:
Detc/netstart | 5-----
Metc/rc | 3---
Metc/rc.conf | 3++-
Metc/rc.d/dropbear | 2++
Aetc/rc.d/network | 21+++++++++++++++++++++
5 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/etc/netstart b/etc/netstart @@ -1,5 +0,0 @@ -#!/bin/sh - -ifconfig eth0 down -pkill sdhcp -ifconfig eth0 up && sdhcp eth0 diff --git a/etc/rc b/etc/rc @@ -21,9 +21,6 @@ echo /bin/smdev > /proc/sys/kernel/hotplug hostname $HOSTNAME -echo Starting network. -sh /etc/netstart - if [ -x /etc/dropbearkeys ]; then /etc/dropbearkeys fi diff --git a/etc/rc.conf b/etc/rc.conf @@ -1,2 +1,3 @@ HOSTNAME=morpheus -SVC="dropbear" +INTERFACE=eth0 +SVC="network dropbear" diff --git a/etc/rc.d/dropbear b/etc/rc.d/dropbear @@ -1,5 +1,7 @@ #!/bin/sh +. /etc/rc.conf + case "$1" in start) dropbear -B diff --git a/etc/rc.d/network b/etc/rc.d/network @@ -0,0 +1,21 @@ +#!/bin/sh + +. /etc/rc.conf + +case "$1" in + start) + ifconfig $INTERFACE up && sdhcp $INTERFACE + ;; + stop) + pkill sdhcp + ifconfig $INTERFACE down + ;; + restart) + pkill sdhcp + ifconfig $INTERFACE down + ifconfig $INTERFACE up && sdhcp $INTERFACE + ;; + *) + echo "usage: $0 [start|stop|restart]" +esac +exit 0