summaryrefslogtreecommitdiff
path: root/openembedded/packages/busybox/files
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
committerRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
commit4b46c1f6e891b1ddd5968536440b888661fade3e (patch)
treee0ba2c1f56f61b868bf746da5c4feabb25b800b2 /openembedded/packages/busybox/files
downloadopenembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.gz
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.bz2
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.xz
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.zip
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/busybox/files')
-rwxr-xr-xopenembedded/packages/busybox/files/busybox-cron39
-rwxr-xr-xopenembedded/packages/busybox/files/busybox-httpd44
-rwxr-xr-xopenembedded/packages/busybox/files/busybox-udhcpd43
-rw-r--r--openembedded/packages/busybox/files/default.script4
-rw-r--r--openembedded/packages/busybox/files/hwclock.sh74
-rwxr-xr-xopenembedded/packages/busybox/files/mount.busybox3
-rw-r--r--openembedded/packages/busybox/files/postinst25
-rw-r--r--openembedded/packages/busybox/files/prerm10
-rw-r--r--openembedded/packages/busybox/files/syslog69
-rw-r--r--openembedded/packages/busybox/files/syslog.conf9
-rwxr-xr-xopenembedded/packages/busybox/files/umount.busybox3
11 files changed, 323 insertions, 0 deletions
diff --git a/openembedded/packages/busybox/files/busybox-cron b/openembedded/packages/busybox/files/busybox-cron
new file mode 100755
index 000000000..f0e6b1562
--- /dev/null
+++ b/openembedded/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/openembedded/packages/busybox/files/busybox-httpd b/openembedded/packages/busybox/files/busybox-httpd
new file mode 100755
index 000000000..c8348e54a
--- /dev/null
+++ b/openembedded/packages/busybox/files/busybox-httpd
@@ -0,0 +1,44 @@
+#!/bin/sh
+DAEMON=/usr/sbin/httpd
+NAME=httpd
+DESC="Busybox HTTP Daemon"
+HTTPROOT="/srv/www"
+ARGS="-h $HTTPROOT"
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "starting $DESC: $NAME... "
+ if [ ! -d $HTTPROOT ]; then
+ echo "$HTTPROOT is missing."
+ exit 1
+ fi
+ 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 "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/openembedded/packages/busybox/files/busybox-udhcpd b/openembedded/packages/busybox/files/busybox-udhcpd
new file mode 100755
index 000000000..c43903e8d
--- /dev/null
+++ b/openembedded/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/openembedded/packages/busybox/files/default.script b/openembedded/packages/busybox/files/default.script
new file mode 100644
index 000000000..f2ac987a2
--- /dev/null
+++ b/openembedded/packages/busybox/files/default.script
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec run-parts -a "$1" /etc/udhcpc.d
+
diff --git a/openembedded/packages/busybox/files/hwclock.sh b/openembedded/packages/busybox/files/hwclock.sh
new file mode 100644
index 000000000..5acfb9fb2
--- /dev/null
+++ b/openembedded/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/openembedded/packages/busybox/files/mount.busybox b/openembedded/packages/busybox/files/mount.busybox
new file mode 100755
index 000000000..fef945b7b
--- /dev/null
+++ b/openembedded/packages/busybox/files/mount.busybox
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /bin/busybox mount $@
diff --git a/openembedded/packages/busybox/files/postinst b/openembedded/packages/busybox/files/postinst
new file mode 100644
index 000000000..36d8190f8
--- /dev/null
+++ b/openembedded/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/openembedded/packages/busybox/files/prerm b/openembedded/packages/busybox/files/prerm
new file mode 100644
index 000000000..7ade4b1de
--- /dev/null
+++ b/openembedded/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/openembedded/packages/busybox/files/syslog b/openembedded/packages/busybox/files/syslog
new file mode 100644
index 000000000..a999565e8
--- /dev/null
+++ b/openembedded/packages/busybox/files/syslog
@@ -0,0 +1,69 @@
+#! /bin/sh
+#
+# syslog init.d script for busybox syslogd/klogd
+# Written by Robert Griebl <sandman@handhelds.org>
+# Configuration file added by <bruno.randolf@4g-systems.biz>
+set -e
+
+if [ -f /etc/syslog.conf ]; then
+ . /etc/syslog.conf
+ LOG_LOCAL=0
+ LOG_REMOTE=0
+ for D in $DESTINATION; do
+ if [ "$D" = "buffer" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -C $BUFFERSIZE"
+ LOG_LOCAL=1
+ elif [ "$D" = "file" ]; then
+ if [ -n "$LOGFILE" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -O $LOGFILE"
+ fi
+ if [ -n "$ROTATESIZE" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -s $ROTATESIZE"
+ fi
+ if [ -n "$ROTATEGENS" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS"
+ fi
+ LOCAL=0
+ elif [ "$D" = "remote" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE"
+ LOG_REMOTE=1
+ fi
+ done
+ if [ "$LOG_LOCAL" = "1" -a "$LOG_REMOTE" = "1" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -L"
+ fi
+ if [ -n "$MARKINT" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -m $MARKINT"
+ fi
+ if [ "$REDUCE" = "yes" ]; then
+ SYSLOG_ARGS="$SYSLOG_ARGS -S"
+ fi
+else
+ # default: log to 16K shm circular buffer
+ SYSLOG_ARGS="-C"
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting syslogd/klogd: "
+ start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS
+ start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n
+ echo "done"
+ ;;
+ stop)
+ echo -n "Stopping syslogd/klogd: "
+ start-stop-daemon -K -n syslogd
+ start-stop-daemon -K -n klogd
+ echo "done"
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: syslog { start | stop | restart }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/openembedded/packages/busybox/files/syslog.conf b/openembedded/packages/busybox/files/syslog.conf
new file mode 100644
index 000000000..d4a0e02f5
--- /dev/null
+++ b/openembedded/packages/busybox/files/syslog.conf
@@ -0,0 +1,9 @@
+DESTINATION="buffer" # log destinations (buffer file remote)
+MARKINT=20 # intervall between --mark-- entries
+LOGFILE=/var/log/messages # where to log (file)
+REMOTE=loghost:514 # where to log (syslog remote)
+REDUCE=no # reduce-size logging
+#ROTATESIZE=0 # rotate log if grown beyond X [kByte] (incompatible with busybox)
+#ROTATEGENS=3 # keep X generations of rotated logs (incompatible with busybox)
+BUFFERSIZE=64 # size of circular buffer [kByte]
+FOREGROUND=no # run in foreground (don't use!)
diff --git a/openembedded/packages/busybox/files/umount.busybox b/openembedded/packages/busybox/files/umount.busybox
new file mode 100755
index 000000000..f3731626e
--- /dev/null
+++ b/openembedded/packages/busybox/files/umount.busybox
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /bin/busybox umount $@