[Clfs-commits] [Bootscripts Embedded]Bootscripts for CLFS Embedded branch, master, updated. b4816b1cd5a50040bed16c40e22faf76701c5d82
git
git at cross-lfs.org
Fri Oct 18 13:16:26 PDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Bootscripts for CLFS Embedded".
The branch, master has been updated
via b4816b1cd5a50040bed16c40e22faf76701c5d82 (commit)
via 47a846f4c6dd18119716448763aa727c0c66789c (commit)
via c91cb03da502350e981e3ffa0e7a001c864c9a47 (commit)
via 929589cb83bb78347788eeceec5d06d9f03662ec (commit)
via 7998c8d36cff412d71efca9a85a1976dd38561da (commit)
via 06619ccbbc690bfbb55632abc3116b20ebb4941c (commit)
via 374f7cebf95c2bdc51585364172f47143ff2ffa0 (commit)
from df6a92257004c28eb564b8051d6f356a046396f7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b4816b1cd5a50040bed16c40e22faf76701c5d82
Author: Andrew Bradford <andrew at bradfordembedded.com>
Date: Fri Oct 18 11:53:54 2013 -0400
startup: Fix rtc detection
Real time clocks, especially if there's more than one, will enumerate
starting with /dev/rtc0. Check for any /dev/rtc* entries NOT /dev/rtc.
diff --git a/clfs/rc.d/startup b/clfs/rc.d/startup
index 1f23cfd..bd69065 100755
--- a/clfs/rc.d/startup
+++ b/clfs/rc.d/startup
@@ -24,7 +24,7 @@ echo -n "Mounting devpts: "
mount /dev/pts
check_status
-if [ -x /sbin/hwclock ] && [ -e /dev/rtc ]; then
+if [ -x /sbin/hwclock ] && [ -e /dev/rtc* ]; then
echo -n "Setting system clock: "
hwclock --hctosys --utc
check_status
commit 47a846f4c6dd18119716448763aa727c0c66789c
Author: Andrew Bradford <andrew at bradfordembedded.com>
Date: Fri Oct 18 11:50:38 2013 -0400
Makefile: fix .PHONY
diff --git a/Makefile b/Makefile
index 29efbbb..e80bc53 100644
--- a/Makefile
+++ b/Makefile
@@ -24,4 +24,4 @@ install-dropbear: create-dirs
ln -sf ../init.d/sshd ${EXTDIR}/rc.d/start/S30sshd
ln -sf ../init.d/sshd ${EXTDIR}/rc.d/stop/K30sshd
-.PHONY: all create-dirs install install-dropbear
+.PHONY: all create-dirs install-bootscripts install-dropbear
commit c91cb03da502350e981e3ffa0e7a001c864c9a47
Author: Andrew Bradford <andrew at bradfordembedded.com>
Date: Fri Oct 18 11:49:40 2013 -0400
Delete network script
We'll use a daemon like ifplugd or netplug to bring the network up or
down on cable detecte/removal. This saves the possible long wait at
power up if dhcp is used and the dhcp server isn't available.
diff --git a/Makefile b/Makefile
index 616bf44..29efbbb 100644
--- a/Makefile
+++ b/Makefile
@@ -15,12 +15,9 @@ install-bootscripts: create-dirs
install -m ${CONFMODE} clfs/rc.d/init.d/functions ${EXTDIR}/rc.d/init.d/
install -m ${MODE} clfs/rc.d/startup ${EXTDIR}/rc.d/
install -m ${MODE} clfs/rc.d/shutdown ${EXTDIR}/rc.d/
- install -m ${MODE} clfs/rc.d/init.d/network ${EXTDIR}/rc.d/init.d/
install -m ${MODE} clfs/rc.d/init.d/syslog ${EXTDIR}/rc.d/init.d/
ln -sf ../init.d/syslog ${EXTDIR}/rc.d/start/S05syslog
ln -sf ../init.d/syslog ${EXTDIR}/rc.d/stop/K99syslog
- ln -sf ../init.d/network ${EXTDIR}/rc.d/start/S10network
- ln -sf ../init.d/network ${EXTDIR}/rc.d/stop/K80network
install-dropbear: create-dirs
install -m ${MODE} clfs/rc.d/init.d/sshd ${EXTDIR}/rc.d/init.d/
diff --git a/clfs/rc.d/init.d/network b/clfs/rc.d/init.d/network
deleted file mode 100755
index fbb55fc..0000000
--- a/clfs/rc.d/init.d/network
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/ash
-#
-# Network interface(s) init script
-#
-# config: /etc/network.conf
-# /etc/network.d/interface.[devname]
-
-. /etc/rc.d/init.d/functions
-. /etc/network.conf
-
-if [ "$NETWORKING" != "yes" ]; then
- echo "Networking is disabled in /etc/network.conf"
- exit 0
-fi
-
-case "$1" in
-start)
- for i in /etc/network.d/interface.*
- do
- if [ -r "$i" ]; then
- . $i
- if [ "$DHCP" = "yes" ]; then
- echo -n "Starting DHCP for interface $INTERFACE: "
- # udhcpc is braindead, bring up interface first
- ifconfig "$INTERFACE" up
-
- # Bridging code requires some time to wake up
- [ "$INTERFACE" = "br0" ] && sleep 5
-
- udhcpc -b -i "$INTERFACE" -s /etc/udhcpc.conf \
- -p "/var/run/udhcpc.$INTERFACE.pid" \
- > /dev/null
- else
- echo -n "Setting up interface $INTERFACE: "
- ifconfig "$INTERFACE" "$IPADDRESS" \
- netmask "$NETMASK" \
- broadcast "$BROADCAST" up
- fi
- check_status
- fi
- done
-
- if [ "$USE_GATEWAY" = "yes" -a -n "$GATEWAY" ]; then
- echo -n "Setting default route: "
- route add default gw $GATEWAY
- check_status
- fi
- ;;
-stop)
- if [ "$USE_GATEWAY" = "yes" -a -n "$GATEWAY" ]; then
- echo -n "Removing default route: "
- route del -net 0.0.0.0
- check_status
- fi
-
- for i in /etc/network.d/interface.*
- do
- if [ -r "$i" ]; then
- . $i
- echo -n "Shutting down interface $INTERFACE: "
- ifconfig $INTERFACE down
- check_status
- if [ "$DHCP" = "yes" ]; then
- kill `cat "/var/run/udhcpc.$INTERFACE.pid"` 2>/dev/null || true
- sleep 1
- fi
- fi
- done
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-status)
- ifconfig
- route
- ;;
-*)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
-esac
commit 929589cb83bb78347788eeceec5d06d9f03662ec
Author: Andrew Bradford <andrew at bradfordembedded.com>
Date: Fri Oct 18 09:35:39 2013 -0400
Makefile: Remove dist target
We can get a tarball from the git web interface, as is done today in
CLFS embedded book.
diff --git a/Makefile b/Makefile
index 59419b2..616bf44 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,10 @@
-VERSION := 1.0-pre5
-
ETCDIR := /etc
EXTDIR := ${DESTDIR}${ETCDIR}
MODE := 754
DIRMODE := 755
CONFMODE := 644
-all:
- @grep "^install" Makefile | cut -d ":" -f 1
- @echo dist
- @echo "Select an appropriate install target from the above list" ; exit 1
-
-dist:
- rm -rf "dist/clfs-embedded-bootscripts-$(VERSION)"
- mkdir -p "dist/clfs-embedded-bootscripts-$(VERSION)"
- tar --exclude dist -c * | tar -x -C "dist/clfs-embedded-bootscripts-$(VERSION)"
- (cd dist; tar -cjf "clfs-embedded-bootscripts-$(VERSION).tar.bz2" "clfs-embedded-bootscripts-$(VERSION)")
- rm -rf "dist/clfs-embedded-bootscripts-$(VERSION)"
+all: install-bootscripts install-dropbear
create-dirs:
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
@@ -39,4 +27,4 @@ install-dropbear: create-dirs
ln -sf ../init.d/sshd ${EXTDIR}/rc.d/start/S30sshd
ln -sf ../init.d/sshd ${EXTDIR}/rc.d/stop/K30sshd
-.PHONY: dist all create-dirs install install-dropbear
+.PHONY: all create-dirs install install-dropbear
commit 7998c8d36cff412d71efca9a85a1976dd38561da
Author: Andrew Bradford <andrew at bradfordembedded.com>
Date: Fri Oct 18 09:24:30 2013 -0400
Delete bridge script
diff --git a/Makefile b/Makefile
index 930b938..59419b2 100644
--- a/Makefile
+++ b/Makefile
@@ -29,13 +29,10 @@ install-bootscripts: create-dirs
install -m ${MODE} clfs/rc.d/shutdown ${EXTDIR}/rc.d/
install -m ${MODE} clfs/rc.d/init.d/network ${EXTDIR}/rc.d/init.d/
install -m ${MODE} clfs/rc.d/init.d/syslog ${EXTDIR}/rc.d/init.d/
- install -m ${MODE} clfs/rc.d/init.d/bridge ${EXTDIR}/rc.d/init.d/
ln -sf ../init.d/syslog ${EXTDIR}/rc.d/start/S05syslog
ln -sf ../init.d/syslog ${EXTDIR}/rc.d/stop/K99syslog
ln -sf ../init.d/network ${EXTDIR}/rc.d/start/S10network
ln -sf ../init.d/network ${EXTDIR}/rc.d/stop/K80network
- ln -sf ../init.d/bridge ${EXTDIR}/rc.d/start/S09bridge
- ln -sf ../init.d/bridge ${EXTDIR}/rc.d/stop/K81bridge
install-dropbear: create-dirs
install -m ${MODE} clfs/rc.d/init.d/sshd ${EXTDIR}/rc.d/init.d/
diff --git a/clfs/rc.d/init.d/bridge b/clfs/rc.d/init.d/bridge
deleted file mode 100755
index 85c7a7a..0000000
--- a/clfs/rc.d/init.d/bridge
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/ash
-#
-# Network interface(s) init script
-#
-# config: /etc/network.conf
-# /etc/network.d/interface.[devname]
-
-. /etc/rc.d/init.d/functions
-. /etc/network.conf
-
-if [ "$NETWORKING" != "yes" ] || [ "${BRIDGE_INTERFACES}" = "" ]; then
- exit 0
-fi
-
-if [ ! -x /usr/sbin/brctl ]; then
- echo -n "Setting up bridge: /usr/sbin/brctl not found "
- false
- check_status
-fi
-
-case "$1" in
-start)
- echo -n "Adding bridge br0: "
- brctl addbr br0
- check_status
-
- for n in ${BRIDGE_INTERFACES}; do
- echo -n "Adding ${n} to bridge: "
- brctl addif br0 ${n}
- # Bring up the interface unless its wireless
- # Wireless has to be configured before you can put it up
- if [ $? = 0 ] && [ ${n} != wlan0 ]; then ifconfig ${n} up; fi
- check_status
- done
- ;;
-stop)
- for n in ${BRIDGE_INTERFACES}; do
- echo -n "Removing ${n} from bridge br0: "
- ifconfig ${n} down 2>/dev/null
- brctl delif br0 ${n}
- check_status
- done
- echo -n "Removing bridge br0: "
- ifconfig br0 down 2>/dev/null
- brctl delbr br0
- check_status
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-status)
- brctl show
- ;;
-*)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
-esac
-
commit 06619ccbbc690bfbb55632abc3116b20ebb4941c
Author: Andrew Bradford <andrew at bradfordembedded.com>
Date: Fri Oct 18 09:24:04 2013 -0400
Delete hostapd script
hostapd has been removed from the CLFS embedded book.
diff --git a/Makefile b/Makefile
index da8a93d..930b938 100644
--- a/Makefile
+++ b/Makefile
@@ -42,10 +42,4 @@ install-dropbear: create-dirs
ln -sf ../init.d/sshd ${EXTDIR}/rc.d/start/S30sshd
ln -sf ../init.d/sshd ${EXTDIR}/rc.d/stop/K30sshd
-install-hostapd: create-dirs
- install -m ${MODE} clfs/rc.d/init.d/hostapd ${EXTDIR}/rc.d/init.d
- ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/start/S08hostapd
- ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/stop/K82hostapd
-
-.PHONY: dist all create-dirs install install-dropbear \
- install-hostapd
+.PHONY: dist all create-dirs install install-dropbear
diff --git a/clfs/rc.d/init.d/hostapd b/clfs/rc.d/init.d/hostapd
deleted file mode 100755
index 70f79b0..0000000
--- a/clfs/rc.d/init.d/hostapd
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/ash
-
-# Hostapd Startup Script
-#
-
-. /etc/rc.d/init.d/functions
-
-PIDFILE=/var/run/hostapd.pid
-
-if [ ! -x /usr/sbin/hostapd ]; then
- echo -n "Starting hostapd: /usr/sbin/hostapd not found "
- false
- check_status
- exit 0
-fi
-
-if [ ! -f /etc/hostapd.conf ]; then
- echo -n "Starting hostapd: /etc/hostapd.conf not found "
- false
- check_status
- exit 0
-fi
-
-case "$1" in
-start)
- echo -n "Starting hostapd: "
- hostapd -P "$PIDFILE" -B /etc/hostapd.conf
- check_status
- ;;
-stop)
- if [ -r "$PIDFILE" ]; then
- echo -n "Stopping hostapd: "
- kill `cat "$PIDFILE"`
- check_status
- else
- echo "Service hostapd not running."
- fi
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-status)
- if [ -r "$PIDFILE" ]; then
- echo "Service hostapd running (PID $(cat "$PIDFILE"))."
- else
- echo "Service hostapd not running."
- fi
- ;;
-*)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
-esac
commit 374f7cebf95c2bdc51585364172f47143ff2ffa0
Author: Andrew Bradford <andrew at bradfordembedded.com>
Date: Fri Oct 18 09:23:16 2013 -0400
Delete bcm47xx-switch
diff --git a/Makefile b/Makefile
index 93fb8e7..da8a93d 100644
--- a/Makefile
+++ b/Makefile
@@ -37,11 +37,6 @@ install-bootscripts: create-dirs
ln -sf ../init.d/bridge ${EXTDIR}/rc.d/start/S09bridge
ln -sf ../init.d/bridge ${EXTDIR}/rc.d/stop/K81bridge
-install-bcm47xx: create-dirs
- install -m ${MODE} clfs/rc.d/init.d/bcm47xx-switch ${EXTDIR}/rc.d/init.d/
- ln -sf ../init.d/bcm47xx-switch ${EXTDIR}/rc.d/start/S08bcm47xx-switch
- ln -sf ../init.d/bcm47xx-switch ${EXTDIR}/rc.d/stop/K82bcm47xx-switch
-
install-dropbear: create-dirs
install -m ${MODE} clfs/rc.d/init.d/sshd ${EXTDIR}/rc.d/init.d/
ln -sf ../init.d/sshd ${EXTDIR}/rc.d/start/S30sshd
@@ -52,5 +47,5 @@ install-hostapd: create-dirs
ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/start/S08hostapd
ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/stop/K82hostapd
-.PHONY: dist all create-dirs install install-bcm47xx install-dropbear \
+.PHONY: dist all create-dirs install install-dropbear \
install-hostapd
diff --git a/clfs/rc.d/init.d/bcm47xx-switch b/clfs/rc.d/init.d/bcm47xx-switch
deleted file mode 100755
index f4b5874..0000000
--- a/clfs/rc.d/init.d/bcm47xx-switch
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/ash
-#
-# Broadcom 47xx vlan and switch configuration init script
-#
-# Config: uses the 'nvram' settings for setting up vlan devices
-
-. /etc/rc.d/init.d/functions
-
-if [ ! -x /sbin/robocfg ]; then
- echo -n "Setting up vlan: /sbin/robocfg not found "
- false
- check_status
-fi
-
-if [ ! -x /sbin/vconfig ]; then
- echo -n "Setting up vlan: /sbin/vconfig not found "
- false
- check_status
-fi
-
-if [ ! -x /sbin/nvram ]; then
- echo -n "Setting up vlan: /sbin/nvram not found "
- false
- check_status
-fi
-
-case "$1" in
-start)
-
- # Add a specific workaround for the case of weirdly set wireless mac address
- # Do what openwrt is doing, and increment the last hex with 2
- if [ "`nvram get il0macaddr`" = 00:90:4c:5f:00:2a ]; then
- et0="$(nvram get et0macaddr)"
- prefix="$(echo $et0 | sed -e 's/:..$//')"
- addendum=$(( (0x$(echo $et0 | sed -e s/.*://g) + 2) % 256 ))
- il0=$(printf %s:%02x $prefix $addendum)
- echo -n "Fixing up wlan0 mac address: "
- nvram set il0macaddr=$il0 && nvram commit
- check_status
- ifconfig wlan0 hw ether $il0 2>/dev/null
- fi
-
- # eth0 has to be up for this
- ifconfig eth0 up
-
- robocfg switch disable
- robocfg vlans enable reset
-
- nvram show | grep vlan[0-4]ports= | sed -e s/vlan// -e s/ports=/\ / |
- while read vlan ports; do
- echo -n "Bringing up eth0.${vlan}: "
- robocfg vlan ${vlan} ports "${ports}" &&
- vconfig add eth0 $vlan
- check_status
- done
- robocfg switch enable
- exit 0
- ;;
-stop)
- # FIXME: Should we really do something at shutdown?
- exit 0
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-status)
- robocfg show
- ;;
-*)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
-esac
-
-----------------------------------------------------------------------
Summary of changes:
Makefile | 33 +---------------
clfs/rc.d/init.d/bcm47xx-switch | 74 -----------------------------------
clfs/rc.d/init.d/bridge | 59 ----------------------------
clfs/rc.d/init.d/hostapd | 53 -------------------------
clfs/rc.d/init.d/network | 81 ---------------------------------------
clfs/rc.d/startup | 2 +-
6 files changed, 3 insertions(+), 299 deletions(-)
delete mode 100755 clfs/rc.d/init.d/bcm47xx-switch
delete mode 100755 clfs/rc.d/init.d/bridge
delete mode 100755 clfs/rc.d/init.d/hostapd
delete mode 100755 clfs/rc.d/init.d/network
hooks/post-receive
--
Bootscripts for CLFS Embedded
More information about the Clfs-commits
mailing list