diff options
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 @@ | |||
1 | #!/bin/sh | ||
2 | DAEMON=/usr/sbin/crond | ||
3 | NAME=crond | ||
4 | DESC="Busybox Periodic Command Scheduler" | ||
5 | ARGS="-c /etc/cron/crontabs" | ||
6 | |||
7 | test -f $DAEMON || exit 0 | ||
8 | |||
9 | set -e | ||
10 | |||
11 | case "$1" in | ||
12 | start) | ||
13 | echo -n "starting $DESC: $NAME... " | ||
14 | start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS | ||
15 | echo "done." | ||
16 | ;; | ||
17 | stop) | ||
18 | echo -n "stopping $DESC: $NAME... " | ||
19 | start-stop-daemon -K -n $NAME | ||
20 | echo "done." | ||
21 | ;; | ||
22 | restart) | ||
23 | echo -n "restarting $DESC: $NAME... " | ||
24 | $0 stop | ||
25 | $0 start | ||
26 | echo "done." | ||
27 | ;; | ||
28 | reload) | ||
29 | echo -n "reloading $DESC: $NAME... " | ||
30 | killall -HUP $(basename ${DAEMON}) | ||
31 | echo "done." | ||
32 | ;; | ||
33 | *) | ||
34 | echo "Usage: $0 {start|stop|restart|reload}" | ||
35 | exit 1 | ||
36 | ;; | ||
37 | esac | ||
38 | |||
39 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | DAEMON=/usr/sbin/httpd | ||
3 | NAME=httpd | ||
4 | DESC="Busybox HTTP Daemon" | ||
5 | HTTPROOT="/srv/www" | ||
6 | ARGS="-h $HTTPROOT" | ||
7 | |||
8 | test -f $DAEMON || exit 0 | ||
9 | |||
10 | set -e | ||
11 | |||
12 | case "$1" in | ||
13 | start) | ||
14 | echo -n "starting $DESC: $NAME... " | ||
15 | if [ ! -d $HTTPROOT ]; then | ||
16 | echo "$HTTPROOT is missing." | ||
17 | exit 1 | ||
18 | fi | ||
19 | start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS | ||
20 | echo "done." | ||
21 | ;; | ||
22 | stop) | ||
23 | echo -n "stopping $DESC: $NAME... " | ||
24 | start-stop-daemon -K -n $NAME | ||
25 | echo "done." | ||
26 | ;; | ||
27 | restart) | ||
28 | echo "restarting $DESC: $NAME... " | ||
29 | $0 stop | ||
30 | $0 start | ||
31 | echo "done." | ||
32 | ;; | ||
33 | reload) | ||
34 | echo -n "reloading $DESC: $NAME... " | ||
35 | killall -HUP $(basename ${DAEMON}) | ||
36 | echo "done." | ||
37 | ;; | ||
38 | *) | ||
39 | echo "Usage: $0 {start|stop|restart|reload}" | ||
40 | exit 1 | ||
41 | ;; | ||
42 | esac | ||
43 | |||
44 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | DAEMON=/usr/sbin/udhcpd | ||
3 | NAME=udhcpd | ||
4 | DESC="Busybox UDHCP Server" | ||
5 | ARGS="/etc/udhcpd.conf" | ||
6 | |||
7 | test -f $DAEMON || exit 1 | ||
8 | |||
9 | set -e | ||
10 | |||
11 | case "$1" in | ||
12 | start) | ||
13 | echo -n "starting $DESC: $NAME... " | ||
14 | if [ ! -f /etc/udhcpd.conf ]; then | ||
15 | echo "error: /etc/udhcpd.conf is missing." | ||
16 | exit 1 | ||
17 | fi | ||
18 | /sbin/start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS | ||
19 | echo "done." | ||
20 | ;; | ||
21 | stop) | ||
22 | echo -n "stopping $DESC: $NAME... " | ||
23 | /sbin/start-stop-daemon -K -n $NAME | ||
24 | echo "done." | ||
25 | ;; | ||
26 | restart) | ||
27 | echo "restarting $DESC: $NAME... " | ||
28 | $0 stop | ||
29 | $0 start | ||
30 | echo "done." | ||
31 | ;; | ||
32 | reload) | ||
33 | echo -n "reloading $DESC: $NAME... " | ||
34 | killall -HUP $(basename ${DAEMON}) | ||
35 | echo "done." | ||
36 | ;; | ||
37 | *) | ||
38 | echo "Usage: $0 {start|stop|restart|reload}" | ||
39 | exit 1 | ||
40 | ;; | ||
41 | esac | ||
42 | |||
43 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | exec run-parts -a "$1" /etc/udhcpc.d | ||
4 | |||
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 @@ | |||
1 | --- busybox-1.01/networking/ping6.c.orig 2006-03-15 15:43:21.000000000 +0100 | ||
2 | +++ busybox-1.01/networking/ping6.c 2006-03-15 15:49:29.000000000 +0100 | ||
3 | @@ -56,6 +56,12 @@ | ||
4 | #include <stddef.h> /* offsetof */ | ||
5 | #include "busybox.h" | ||
6 | |||
7 | +#ifndef ICMP6_MEMBERSHIP_QUERY /* glibc >= 2.4 */ | ||
8 | +#define ICMP6_MEMBERSHIP_QUERY MLD_LISTENER_QUERY | ||
9 | +#define ICMP6_MEMBERSHIP_REPORT MLD_LISTENER_REPORT | ||
10 | +#define ICMP6_MEMBERSHIP_REDUCTION MLD_LISTENER_REDUCTION | ||
11 | +#endif | ||
12 | + | ||
13 | static const int DEFDATALEN = 56; | ||
14 | static const int MAXIPLEN = 60; | ||
15 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | # hwclock.sh Set system clock to hardware clock, according to the UTC | ||
3 | # setting in /etc/default/rcS (see also rcS(5)). | ||
4 | # | ||
5 | # WARNING: If your hardware clock is not in UTC/GMT, this script | ||
6 | # must know the local time zone. This information is | ||
7 | # stored in /etc/localtime. This might be a problem if | ||
8 | # your /etc/localtime is a symlink to something in | ||
9 | # /usr/share/zoneinfo AND /usr isn't in the root | ||
10 | # partition! The workaround is to define TZ either | ||
11 | # in /etc/default/rcS, or in the proper place below. | ||
12 | |||
13 | [ ! -x /sbin/hwclock ] && exit 0 | ||
14 | |||
15 | . /etc/default/rcS | ||
16 | |||
17 | case "$1" in | ||
18 | start) | ||
19 | if [ "$VERBOSE" != no ] | ||
20 | then | ||
21 | echo "System time was `date`." | ||
22 | echo "Setting the System Clock using the Hardware Clock as reference..." | ||
23 | fi | ||
24 | |||
25 | if [ "$HWCLOCKACCESS" != no ] | ||
26 | then | ||
27 | if [ -z "$TZ" ] | ||
28 | then | ||
29 | hwclock --hctosys | ||
30 | else | ||
31 | TZ="$TZ" hwclock --hctosys | ||
32 | fi | ||
33 | fi | ||
34 | |||
35 | if [ "$VERBOSE" != no ] | ||
36 | then | ||
37 | echo "System Clock set. System local time is now `date`." | ||
38 | fi | ||
39 | ;; | ||
40 | stop|restart|reload|force-reload) | ||
41 | # | ||
42 | # Updates the Hardware Clock with the System Clock time. | ||
43 | # This will *override* any changes made to the Hardware Clock. | ||
44 | # | ||
45 | # WARNING: If you disable this, any changes to the system | ||
46 | # clock will not be carried across reboots. | ||
47 | # | ||
48 | if [ "$VERBOSE" != no ] | ||
49 | then | ||
50 | echo "Saving the System Clock time to the Hardware Clock..." | ||
51 | fi | ||
52 | if [ "$HWCLOCKACCESS" != no ] | ||
53 | then | ||
54 | hwclock --systohc | ||
55 | fi | ||
56 | if [ "$VERBOSE" != no ] | ||
57 | then | ||
58 | echo "Hardware Clock updated to `date`." | ||
59 | fi | ||
60 | exit 0 | ||
61 | ;; | ||
62 | show) | ||
63 | if [ "$HWCLOCKACCESS" != no ] | ||
64 | then | ||
65 | hwclock --show | ||
66 | fi | ||
67 | ;; | ||
68 | *) | ||
69 | echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2 | ||
70 | echo " start sets kernel (system) clock from hardware (RTC) clock" >&2 | ||
71 | echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2 | ||
72 | exit 1 | ||
73 | ;; | ||
74 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | 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 @@ | |||
1 | #!/bin/busybox ash | ||
2 | |||
3 | action="$1" | ||
4 | oldversion="$2" | ||
5 | |||
6 | umask 022 | ||
7 | |||
8 | if /bin/busybox [ "$action" != configure ] | ||
9 | then | ||
10 | exit 0 | ||
11 | fi | ||
12 | |||
13 | . /etc/default/functions | ||
14 | |||
15 | setup_init_hwclock() { | ||
16 | updatercd hwclock.sh start 50 S . stop 25 0 1 6 . | ||
17 | /etc/init.d/hwclock.sh restart | ||
18 | } | ||
19 | |||
20 | /bin/busybox ash /usr/bin/update-alternatives --install /bin/vi vi /bin/busybox 100 | ||
21 | /bin/busybox ash /usr/bin/update-alternatives --install /bin/sh sh /bin/busybox 100 | ||
22 | |||
23 | setup_init_hwclock | ||
24 | |||
25 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ "$1" != "upgrade" ]; then | ||
4 | update-alternatives --remove sh /bin/busybox | ||
5 | update-alternatives --remove vi /bin/busybox | ||
6 | find /etc -name [SK][0-9][0-9]hwclock.sh | xargs rm -f | ||
7 | find /etc -name [SK][0-9][0-9]syslog | xargs rm -f | ||
8 | fi | ||
9 | |||
10 | 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 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # syslog init.d script for busybox syslogd/klogd | ||
4 | # Written by Robert Griebl <sandman@handhelds.org> | ||
5 | # Configuration file added by <bruno.randolf@4g-systems.biz> | ||
6 | set -e | ||
7 | |||
8 | if [ -f /etc/syslog.conf ]; then | ||
9 | . /etc/syslog.conf | ||
10 | LOG_LOCAL=0 | ||
11 | LOG_REMOTE=0 | ||
12 | for D in $DESTINATION; do | ||
13 | if [ "$D" = "buffer" ]; then | ||
14 | SYSLOG_ARGS="$SYSLOG_ARGS -C $BUFFERSIZE" | ||
15 | LOG_LOCAL=1 | ||
16 | elif [ "$D" = "file" ]; then | ||
17 | if [ -n "$LOGFILE" ]; then | ||
18 | SYSLOG_ARGS="$SYSLOG_ARGS -O $LOGFILE" | ||
19 | fi | ||
20 | if [ -n "$ROTATESIZE" ]; then | ||
21 | SYSLOG_ARGS="$SYSLOG_ARGS -s $ROTATESIZE" | ||
22 | fi | ||
23 | if [ -n "$ROTATEGENS" ]; then | ||
24 | SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS" | ||
25 | fi | ||
26 | LOCAL=0 | ||
27 | elif [ "$D" = "remote" ]; then | ||
28 | SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE" | ||
29 | LOG_REMOTE=1 | ||
30 | fi | ||
31 | done | ||
32 | if [ "$LOG_LOCAL" = "1" -a "$LOG_REMOTE" = "1" ]; then | ||
33 | SYSLOG_ARGS="$SYSLOG_ARGS -L" | ||
34 | fi | ||
35 | if [ -n "$MARKINT" ]; then | ||
36 | SYSLOG_ARGS="$SYSLOG_ARGS -m $MARKINT" | ||
37 | fi | ||
38 | if [ "$REDUCE" = "yes" ]; then | ||
39 | SYSLOG_ARGS="$SYSLOG_ARGS -S" | ||
40 | fi | ||
41 | else | ||
42 | # default: log to 16K shm circular buffer | ||
43 | SYSLOG_ARGS="-C" | ||
44 | fi | ||
45 | |||
46 | case "$1" in | ||
47 | start) | ||
48 | echo -n "Starting syslogd/klogd: " | ||
49 | start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS | ||
50 | start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n | ||
51 | echo "done" | ||
52 | ;; | ||
53 | stop) | ||
54 | echo -n "Stopping syslogd/klogd: " | ||
55 | start-stop-daemon -K -n syslogd | ||
56 | start-stop-daemon -K -n klogd | ||
57 | echo "done" | ||
58 | ;; | ||
59 | restart) | ||
60 | $0 stop | ||
61 | $0 start | ||
62 | ;; | ||
63 | *) | ||
64 | echo "Usage: syslog { start | stop | restart }" >&2 | ||
65 | exit 1 | ||
66 | ;; | ||
67 | esac | ||
68 | |||
69 | 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 @@ | |||
1 | DESTINATION="buffer" # log destinations (buffer file remote) | ||
2 | MARKINT=20 # intervall between --mark-- entries | ||
3 | LOGFILE=/var/log/messages # where to log (file) | ||
4 | REMOTE=loghost:514 # where to log (syslog remote) | ||
5 | REDUCE=no # reduce-size logging | ||
6 | #ROTATESIZE=0 # rotate log if grown beyond X [kByte] (incompatible with busybox) | ||
7 | #ROTATEGENS=3 # keep X generations of rotated logs (incompatible with busybox) | ||
8 | BUFFERSIZE=64 # size of circular buffer [kByte] | ||
9 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | exec /bin/busybox umount $@ | ||