aboutsummaryrefslogtreecommitdiffstats
path: root/packages/busybox/files
diff options
context:
space:
mode:
Diffstat (limited to 'packages/busybox/files')
-rw-r--r--packages/busybox/files/.mtn2git_empty0
-rwxr-xr-x[-rw-r--r--]packages/busybox/files/busybox-cron39
-rwxr-xr-x[-rw-r--r--]packages/busybox/files/busybox-httpd0
-rwxr-xr-x[-rw-r--r--]packages/busybox/files/busybox-udhcpd43
-rw-r--r--packages/busybox/files/default.script4
-rw-r--r--packages/busybox/files/hwclock.sh74
-rwxr-xr-x[-rw-r--r--]packages/busybox/files/mount.busybox3
-rw-r--r--packages/busybox/files/postinst25
-rw-r--r--packages/busybox/files/prerm10
-rwxr-xr-x[-rw-r--r--]packages/busybox/files/umount.busybox3
10 files changed, 201 insertions, 0 deletions
diff --git a/packages/busybox/files/.mtn2git_empty b/packages/busybox/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/busybox/files/.mtn2git_empty
diff --git a/packages/busybox/files/busybox-cron b/packages/busybox/files/busybox-cron
index e69de29bb2..f0e6b15629 100644..100755
--- a/packages/busybox/files/busybox-cron
+++ b/packages/busybox/files/busybox-cron
@@ -0,0 +1,39 @@
+#!/bin/sh
+DAEMON=/usr/sbin/crond
+NAME=crond
+DESC="Busybox Periodic Command Scheduler"
+ARGS="-c /etc/cron/crontabs"
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "starting $DESC: $NAME... "
+ start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
+ echo "done."
+ ;;
+ stop)
+ echo -n "stopping $DESC: $NAME... "
+ start-stop-daemon -K -n $NAME
+ echo "done."
+ ;;
+ restart)
+ echo -n "restarting $DESC: $NAME... "
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
+ reload)
+ echo -n "reloading $DESC: $NAME... "
+ killall -HUP $(basename ${DAEMON})
+ echo "done."
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/busybox/files/busybox-httpd b/packages/busybox/files/busybox-httpd
index c8348e54a7..c8348e54a7 100644..100755
--- a/packages/busybox/files/busybox-httpd
+++ b/packages/busybox/files/busybox-httpd
diff --git a/packages/busybox/files/busybox-udhcpd b/packages/busybox/files/busybox-udhcpd
index e69de29bb2..c43903e8dc 100644..100755
--- a/packages/busybox/files/busybox-udhcpd
+++ b/packages/busybox/files/busybox-udhcpd
@@ -0,0 +1,43 @@
+#!/bin/sh
+DAEMON=/usr/sbin/udhcpd
+NAME=udhcpd
+DESC="Busybox UDHCP Server"
+ARGS="/etc/udhcpd.conf"
+
+test -f $DAEMON || exit 1
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "starting $DESC: $NAME... "
+ if [ ! -f /etc/udhcpd.conf ]; then
+ echo "error: /etc/udhcpd.conf is missing."
+ exit 1
+ fi
+ /sbin/start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
+ echo "done."
+ ;;
+ stop)
+ echo -n "stopping $DESC: $NAME... "
+ /sbin/start-stop-daemon -K -n $NAME
+ echo "done."
+ ;;
+ restart)
+ echo "restarting $DESC: $NAME... "
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
+ reload)
+ echo -n "reloading $DESC: $NAME... "
+ killall -HUP $(basename ${DAEMON})
+ echo "done."
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/busybox/files/default.script b/packages/busybox/files/default.script
index e69de29bb2..f2ac987a27 100644
--- a/packages/busybox/files/default.script
+++ b/packages/busybox/files/default.script
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec run-parts -a "$1" /etc/udhcpc.d
+
diff --git a/packages/busybox/files/hwclock.sh b/packages/busybox/files/hwclock.sh
index e69de29bb2..5acfb9fb24 100644
--- a/packages/busybox/files/hwclock.sh
+++ b/packages/busybox/files/hwclock.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# hwclock.sh Set system clock to hardware clock, according to the UTC
+# setting in /etc/default/rcS (see also rcS(5)).
+#
+# WARNING: If your hardware clock is not in UTC/GMT, this script
+# must know the local time zone. This information is
+# stored in /etc/localtime. This might be a problem if
+# your /etc/localtime is a symlink to something in
+# /usr/share/zoneinfo AND /usr isn't in the root
+# partition! The workaround is to define TZ either
+# in /etc/default/rcS, or in the proper place below.
+
+[ ! -x /sbin/hwclock ] && exit 0
+
+. /etc/default/rcS
+
+case "$1" in
+ start)
+ if [ "$VERBOSE" != no ]
+ then
+ echo "System time was `date`."
+ echo "Setting the System Clock using the Hardware Clock as reference..."
+ fi
+
+ if [ "$HWCLOCKACCESS" != no ]
+ then
+ if [ -z "$TZ" ]
+ then
+ hwclock --hctosys
+ else
+ TZ="$TZ" hwclock --hctosys
+ fi
+ fi
+
+ if [ "$VERBOSE" != no ]
+ then
+ echo "System Clock set. System local time is now `date`."
+ fi
+ ;;
+ stop|restart|reload|force-reload)
+ #
+ # Updates the Hardware Clock with the System Clock time.
+ # This will *override* any changes made to the Hardware Clock.
+ #
+ # WARNING: If you disable this, any changes to the system
+ # clock will not be carried across reboots.
+ #
+ if [ "$VERBOSE" != no ]
+ then
+ echo "Saving the System Clock time to the Hardware Clock..."
+ fi
+ if [ "$HWCLOCKACCESS" != no ]
+ then
+ hwclock --systohc
+ fi
+ if [ "$VERBOSE" != no ]
+ then
+ echo "Hardware Clock updated to `date`."
+ fi
+ exit 0
+ ;;
+ show)
+ if [ "$HWCLOCKACCESS" != no ]
+ then
+ hwclock --show
+ fi
+ ;;
+ *)
+ echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2
+ echo " start sets kernel (system) clock from hardware (RTC) clock" >&2
+ echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2
+ exit 1
+ ;;
+esac
diff --git a/packages/busybox/files/mount.busybox b/packages/busybox/files/mount.busybox
index e69de29bb2..fef945b7b2 100644..100755
--- a/packages/busybox/files/mount.busybox
+++ b/packages/busybox/files/mount.busybox
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /bin/busybox mount $@
diff --git a/packages/busybox/files/postinst b/packages/busybox/files/postinst
index e69de29bb2..36d8190f80 100644
--- a/packages/busybox/files/postinst
+++ b/packages/busybox/files/postinst
@@ -0,0 +1,25 @@
+#!/bin/busybox ash
+
+action="$1"
+oldversion="$2"
+
+umask 022
+
+if /bin/busybox [ "$action" != configure ]
+then
+ exit 0
+fi
+
+. /etc/default/functions
+
+setup_init_hwclock() {
+ updatercd hwclock.sh start 50 S . stop 25 0 1 6 .
+ /etc/init.d/hwclock.sh restart
+}
+
+/bin/busybox ash /usr/bin/update-alternatives --install /bin/vi vi /bin/busybox 100
+/bin/busybox ash /usr/bin/update-alternatives --install /bin/sh sh /bin/busybox 100
+
+setup_init_hwclock
+
+exit 0
diff --git a/packages/busybox/files/prerm b/packages/busybox/files/prerm
index e69de29bb2..7ade4b1dec 100644
--- a/packages/busybox/files/prerm
+++ b/packages/busybox/files/prerm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ "$1" != "upgrade" ]; then
+ update-alternatives --remove sh /bin/busybox
+ update-alternatives --remove vi /bin/busybox
+ find /etc -name [SK][0-9][0-9]hwclock.sh | xargs rm -f
+ find /etc -name [SK][0-9][0-9]syslog | xargs rm -f
+fi
+
+exit 0
diff --git a/packages/busybox/files/umount.busybox b/packages/busybox/files/umount.busybox
index e69de29bb2..f3731626e6 100644..100755
--- a/packages/busybox/files/umount.busybox
+++ b/packages/busybox/files/umount.busybox
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /bin/busybox umount $@