diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/busybox/files | |
parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
download | openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.bz2 openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.zip |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/busybox/files')
-rwxr-xr-x | meta/packages/busybox/files/busybox-cron | 39 | ||||
-rwxr-xr-x | meta/packages/busybox/files/busybox-httpd | 44 | ||||
-rwxr-xr-x | meta/packages/busybox/files/busybox-udhcpd | 43 | ||||
-rw-r--r-- | meta/packages/busybox/files/default.script | 4 | ||||
-rw-r--r-- | meta/packages/busybox/files/glibc2.4-icmp6.patch | 15 | ||||
-rw-r--r-- | meta/packages/busybox/files/hwclock.sh | 74 | ||||
-rwxr-xr-x | meta/packages/busybox/files/mount.busybox | 3 | ||||
-rw-r--r-- | meta/packages/busybox/files/postinst | 25 | ||||
-rw-r--r-- | meta/packages/busybox/files/prerm | 10 | ||||
-rw-r--r-- | meta/packages/busybox/files/syslog | 69 | ||||
-rw-r--r-- | meta/packages/busybox/files/syslog.conf | 9 | ||||
-rwxr-xr-x | meta/packages/busybox/files/umount.busybox | 3 |
12 files changed, 338 insertions, 0 deletions
diff --git a/meta/packages/busybox/files/busybox-cron b/meta/packages/busybox/files/busybox-cron new file mode 100755 index 0000000000..f0e6b15629 --- /dev/null +++ b/meta/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/meta/packages/busybox/files/busybox-httpd b/meta/packages/busybox/files/busybox-httpd new file mode 100755 index 0000000000..c8348e54a7 --- /dev/null +++ b/meta/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/meta/packages/busybox/files/busybox-udhcpd b/meta/packages/busybox/files/busybox-udhcpd new file mode 100755 index 0000000000..c43903e8dc --- /dev/null +++ b/meta/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/meta/packages/busybox/files/default.script b/meta/packages/busybox/files/default.script new file mode 100644 index 0000000000..f2ac987a27 --- /dev/null +++ b/meta/packages/busybox/files/default.script @@ -0,0 +1,4 @@ +#!/bin/sh + +exec run-parts -a "$1" /etc/udhcpc.d + diff --git a/meta/packages/busybox/files/glibc2.4-icmp6.patch b/meta/packages/busybox/files/glibc2.4-icmp6.patch new file mode 100644 index 0000000000..3cec1dd31a --- /dev/null +++ b/meta/packages/busybox/files/glibc2.4-icmp6.patch @@ -0,0 +1,15 @@ +--- busybox-1.01/networking/ping6.c.orig 2006-03-15 15:43:21.000000000 +0100 ++++ busybox-1.01/networking/ping6.c 2006-03-15 15:49:29.000000000 +0100 +@@ -56,6 +56,12 @@ + #include <stddef.h> /* offsetof */ + #include "busybox.h" + ++#ifndef ICMP6_MEMBERSHIP_QUERY /* glibc >= 2.4 */ ++#define ICMP6_MEMBERSHIP_QUERY MLD_LISTENER_QUERY ++#define ICMP6_MEMBERSHIP_REPORT MLD_LISTENER_REPORT ++#define ICMP6_MEMBERSHIP_REDUCTION MLD_LISTENER_REDUCTION ++#endif ++ + static const int DEFDATALEN = 56; + static const int MAXIPLEN = 60; + static const int MAXICMPLEN = 76; diff --git a/meta/packages/busybox/files/hwclock.sh b/meta/packages/busybox/files/hwclock.sh new file mode 100644 index 0000000000..5acfb9fb24 --- /dev/null +++ b/meta/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/meta/packages/busybox/files/mount.busybox b/meta/packages/busybox/files/mount.busybox new file mode 100755 index 0000000000..fef945b7b2 --- /dev/null +++ b/meta/packages/busybox/files/mount.busybox @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /bin/busybox mount $@ diff --git a/meta/packages/busybox/files/postinst b/meta/packages/busybox/files/postinst new file mode 100644 index 0000000000..36d8190f80 --- /dev/null +++ b/meta/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/meta/packages/busybox/files/prerm b/meta/packages/busybox/files/prerm new file mode 100644 index 0000000000..7ade4b1dec --- /dev/null +++ b/meta/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/meta/packages/busybox/files/syslog b/meta/packages/busybox/files/syslog new file mode 100644 index 0000000000..a999565e84 --- /dev/null +++ b/meta/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/meta/packages/busybox/files/syslog.conf b/meta/packages/busybox/files/syslog.conf new file mode 100644 index 0000000000..d4a0e02f5b --- /dev/null +++ b/meta/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/meta/packages/busybox/files/umount.busybox b/meta/packages/busybox/files/umount.busybox new file mode 100755 index 0000000000..f3731626e6 --- /dev/null +++ b/meta/packages/busybox/files/umount.busybox @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /bin/busybox umount $@ |