diff options
Diffstat (limited to 'meta/recipes-core/busybox/files')
20 files changed, 555 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/files/busybox-cron b/meta/recipes-core/busybox/files/busybox-cron new file mode 100755 index 0000000000..f0e6b15629 --- /dev/null +++ b/meta/recipes-core/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/recipes-core/busybox/files/busybox-httpd b/meta/recipes-core/busybox/files/busybox-httpd new file mode 100755 index 0000000000..c8348e54a7 --- /dev/null +++ b/meta/recipes-core/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/recipes-core/busybox/files/busybox-klogd.service.in b/meta/recipes-core/busybox/files/busybox-klogd.service.in new file mode 100644 index 0000000000..d7c77558f3 --- /dev/null +++ b/meta/recipes-core/busybox/files/busybox-klogd.service.in | |||
@@ -0,0 +1,8 @@ | |||
1 | [Unit] | ||
2 | Description=Kernel Logging Service | ||
3 | |||
4 | [Service] | ||
5 | ExecStart=@base_sbindir@/klogd -n | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.default b/meta/recipes-core/busybox/files/busybox-syslog.default new file mode 100644 index 0000000000..e516caf518 --- /dev/null +++ b/meta/recipes-core/busybox/files/busybox-syslog.default | |||
@@ -0,0 +1,25 @@ | |||
1 | OPTIONS="-C" | ||
2 | # The above option means syslogd will log to 16K shm circular buffer. | ||
3 | # You could use `logread' to read it. | ||
4 | |||
5 | # All available options are: | ||
6 | # -O FILE : Log to FILE (default:/var/log/messages) | ||
7 | # -l N : Log only messages more urgent than prio N (1-8) | ||
8 | # -S : Smaller output | ||
9 | # -s SIZE : Max size (KB) before rotation (default:200KB, 0=off) | ||
10 | # -b N : N rotated logs to keep (default:1, max=99, 0=purge) | ||
11 | # -R HOST[:PORT]: Log to HOST:PORT (default PORT:514) | ||
12 | # -L : Log locally and via network | ||
13 | # -D : Drop duplicates | ||
14 | # -C[size_kb] : Log to shared mem buffer (use logread to read it) | ||
15 | # -f FILE : Use FILE as config (default:/etc/syslog.conf) | ||
16 | # -m MIN : Minutes between mark lines (default:20, 0=off) | ||
17 | # -K : Log to kernel printk buffer (use dmesg to read it) | ||
18 | |||
19 | # Example 1: | ||
20 | # Log to local file /var/log/mylog | ||
21 | # OPTIONS="-O /var/log/mylog" | ||
22 | # | ||
23 | # Example 2: | ||
24 | # Log to remote host | ||
25 | # OPTIONS="-R 192.168.1.1:601" | ||
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.service.in b/meta/recipes-core/busybox/files/busybox-syslog.service.in new file mode 100644 index 0000000000..2e04321385 --- /dev/null +++ b/meta/recipes-core/busybox/files/busybox-syslog.service.in | |||
@@ -0,0 +1,13 @@ | |||
1 | [Unit] | ||
2 | Description=System Logging Service | ||
3 | Wants=busybox-klogd.service | ||
4 | |||
5 | [Service] | ||
6 | EnvironmentFile=-/etc/default/busybox-syslog | ||
7 | ExecStart=@base_sbindir@/syslogd -n $OPTIONS | ||
8 | Sockets=syslog.socket | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
12 | Also=busybox-klogd.service | ||
13 | Alias=syslog.service | ||
diff --git a/meta/recipes-core/busybox/files/busybox-udhcpd b/meta/recipes-core/busybox/files/busybox-udhcpd new file mode 100755 index 0000000000..c43903e8dc --- /dev/null +++ b/meta/recipes-core/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/recipes-core/busybox/files/default.script b/meta/recipes-core/busybox/files/default.script new file mode 100644 index 0000000000..f2ac987a27 --- /dev/null +++ b/meta/recipes-core/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/recipes-core/busybox/files/find-touchscreen.sh b/meta/recipes-core/busybox/files/find-touchscreen.sh new file mode 100644 index 0000000000..1582ea891c --- /dev/null +++ b/meta/recipes-core/busybox/files/find-touchscreen.sh | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ `egrep "input:.*-e0.*,3,.*a0,1,.*18,.*" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then | ||
4 | ln -sf /dev/input/$MDEV /dev/input/touchscreen0 | ||
5 | fi | ||
6 | |||
7 | if [ `egrep "ads7846" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then | ||
8 | ln -sf /dev/input/$MDEV /dev/input/touchscreen0 | ||
9 | fi | ||
diff --git a/meta/recipes-core/busybox/files/hwclock.sh b/meta/recipes-core/busybox/files/hwclock.sh new file mode 100644 index 0000000000..be5f94d86c --- /dev/null +++ b/meta/recipes-core/busybox/files/hwclock.sh | |||
@@ -0,0 +1,83 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: hwclock | ||
4 | # Required-Start: | ||
5 | # Required-Stop: $local_fs | ||
6 | # Default-Start: S | ||
7 | # Default-Stop: 0 6 | ||
8 | # Short-Description: Set system clock | ||
9 | # Description: Set system clock to hardware clock, according to the UTC | ||
10 | # setting in /etc/default/rcS (see also rcS(5)). | ||
11 | ### END INIT INFO | ||
12 | # | ||
13 | # WARNING: If your hardware clock is not in UTC/GMT, this script | ||
14 | # must know the local time zone. This information is | ||
15 | # stored in /etc/localtime. This might be a problem if | ||
16 | # your /etc/localtime is a symlink to something in | ||
17 | # /usr/share/zoneinfo AND /usr isn't in the root | ||
18 | # partition! The workaround is to define TZ either | ||
19 | # in /etc/default/rcS, or in the proper place below. | ||
20 | |||
21 | [ ! -x /sbin/hwclock ] && exit 0 | ||
22 | |||
23 | [ -f /etc/default/rcS ] && . /etc/default/rcS | ||
24 | |||
25 | [ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime" | ||
26 | case "$1" in | ||
27 | start) | ||
28 | if [ "$VERBOSE" != no ] | ||
29 | then | ||
30 | echo "System time was `date`." | ||
31 | echo "Setting the System Clock using the Hardware Clock as reference..." | ||
32 | fi | ||
33 | |||
34 | if [ "$HWCLOCKACCESS" != no ] | ||
35 | then | ||
36 | if [ -z "$TZ" ] | ||
37 | then | ||
38 | hwclock $tz --hctosys | ||
39 | else | ||
40 | TZ="$TZ" hwclock $tz --hctosys | ||
41 | fi | ||
42 | fi | ||
43 | |||
44 | if [ "$VERBOSE" != no ] | ||
45 | then | ||
46 | echo "System Clock set. System local time is now `date`." | ||
47 | fi | ||
48 | ;; | ||
49 | stop|restart|reload|force-reload) | ||
50 | # | ||
51 | # Updates the Hardware Clock with the System Clock time. | ||
52 | # This will *override* any changes made to the Hardware Clock. | ||
53 | # | ||
54 | # WARNING: If you disable this, any changes to the system | ||
55 | # clock will not be carried across reboots. | ||
56 | # | ||
57 | if [ "$VERBOSE" != no ] | ||
58 | then | ||
59 | echo "Saving the System Clock time to the Hardware Clock..." | ||
60 | fi | ||
61 | if [ "$HWCLOCKACCESS" != no ] | ||
62 | then | ||
63 | hwclock $tz --systohc | ||
64 | fi | ||
65 | if [ "$VERBOSE" != no ] | ||
66 | then | ||
67 | echo "Hardware Clock updated to `date`." | ||
68 | fi | ||
69 | exit 0 | ||
70 | ;; | ||
71 | show) | ||
72 | if [ "$HWCLOCKACCESS" != no ] | ||
73 | then | ||
74 | hwclock $tz --show | ||
75 | fi | ||
76 | ;; | ||
77 | *) | ||
78 | echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2 | ||
79 | echo " start sets kernel (system) clock from hardware (RTC) clock" >&2 | ||
80 | echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2 | ||
81 | exit 1 | ||
82 | ;; | ||
83 | esac | ||
diff --git a/meta/recipes-core/busybox/files/inetd b/meta/recipes-core/busybox/files/inetd new file mode 100644 index 0000000000..cf50bcd546 --- /dev/null +++ b/meta/recipes-core/busybox/files/inetd | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # start/stop inetd super server. | ||
4 | |||
5 | if ! [ -x /usr/sbin/inetd ]; then | ||
6 | exit 0 | ||
7 | fi | ||
8 | |||
9 | case "$1" in | ||
10 | start) | ||
11 | echo -n "Starting internet superserver:" | ||
12 | echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null | ||
13 | echo "." | ||
14 | ;; | ||
15 | stop) | ||
16 | echo -n "Stopping internet superserver:" | ||
17 | echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null | ||
18 | echo "." | ||
19 | ;; | ||
20 | restart) | ||
21 | echo -n "Restarting internet superserver:" | ||
22 | echo -n " inetd " | ||
23 | killall -HUP inetd | ||
24 | echo "." | ||
25 | ;; | ||
26 | *) | ||
27 | echo "Usage: /etc/init.d/inetd {start|stop|restart}" | ||
28 | exit 1 | ||
29 | ;; | ||
30 | esac | ||
31 | |||
32 | exit 0 | ||
33 | |||
diff --git a/meta/recipes-core/busybox/files/inetd.conf b/meta/recipes-core/busybox/files/inetd.conf new file mode 100644 index 0000000000..b02fe850c9 --- /dev/null +++ b/meta/recipes-core/busybox/files/inetd.conf | |||
@@ -0,0 +1,20 @@ | |||
1 | # /etc/inetd.conf: see inetd(8) for further informations. | ||
2 | # | ||
3 | # Internet server configuration database | ||
4 | # | ||
5 | # If you want to disable an entry so it isn't touched during | ||
6 | # package updates just comment it out with a single '#' character. | ||
7 | # | ||
8 | # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> | ||
9 | # | ||
10 | #:INTERNAL: Internal services | ||
11 | #echo stream tcp nowait root internal | ||
12 | #echo dgram udp wait root internal | ||
13 | #chargen stream tcp nowait root internal | ||
14 | #chargen dgram udp wait root internal | ||
15 | #discard stream tcp nowait root internal | ||
16 | #discard dgram udp wait root internal | ||
17 | #daytime stream tcp nowait root internal | ||
18 | #daytime dgram udp wait root internal | ||
19 | #time stream tcp nowait root internal | ||
20 | #time dgram udp wait root internal | ||
diff --git a/meta/recipes-core/busybox/files/mdev b/meta/recipes-core/busybox/files/mdev new file mode 100755 index 0000000000..4eba6190c7 --- /dev/null +++ b/meta/recipes-core/busybox/files/mdev | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | mount -t tmpfs tmpfs /dev -o size=64k,mode=0755 | ||
4 | mkdir /dev/pts /dev/shm | ||
5 | mount -t devpts devpts /dev/pts | ||
6 | echo "/sbin/mdev" > /proc/sys/kernel/hotplug | ||
7 | mdev -s | ||
diff --git a/meta/recipes-core/busybox/files/mdev.conf b/meta/recipes-core/busybox/files/mdev.conf new file mode 100644 index 0000000000..e688911ff1 --- /dev/null +++ b/meta/recipes-core/busybox/files/mdev.conf | |||
@@ -0,0 +1,37 @@ | |||
1 | console 0:0 0600 | ||
2 | cpu_dma_latency 0:0 0660 | ||
3 | fb0:0 44 0660 | ||
4 | full 0:0 0666 | ||
5 | initctl 0:0 0600 | ||
6 | ircomm[0-9].* 0:20 0660 | ||
7 | kmem 0:15 0640 | ||
8 | kmsg 0:0 0660 | ||
9 | log 0:0 0666 | ||
10 | loop[0-9].* 0:6 0640 | ||
11 | mem 0:15 0640 | ||
12 | network_latency 0:0 0660 | ||
13 | network_throughput 0:0 0660 | ||
14 | null 0:0 0666 | ||
15 | port 0:15 0640 | ||
16 | ptmx 0:5 0666 | ||
17 | ram[0-9].* 0:6 0640 | ||
18 | random 0:0 0666 | ||
19 | sda 0:6 0640 | ||
20 | tty 0:5 0666 | ||
21 | tty.* 0:0 0620 | ||
22 | urandom 0:0 0666 | ||
23 | usbdev.* 0:0 0660 */etc/mdev/usb.sh | ||
24 | vcs.* 0:5 0660 | ||
25 | zero 0:0 0666 | ||
26 | |||
27 | snd/pcm.* 0:0 0660 | ||
28 | snd/control.* 0:0 0660 | ||
29 | snd/timer 0:0 0660 | ||
30 | snd/seq 0:0 0660 | ||
31 | snd/mini.* 0:00 0660 | ||
32 | |||
33 | input/event.* 0:0 0660 @/etc/mdev/find-touchscreen.sh | ||
34 | input/mice 0:0 0660 | ||
35 | input/mouse.* 0:0 0660 | ||
36 | |||
37 | tun[0-9]* 0:0 0660 =net/ | ||
diff --git a/meta/recipes-core/busybox/files/mount.busybox b/meta/recipes-core/busybox/files/mount.busybox new file mode 100755 index 0000000000..fef945b7b2 --- /dev/null +++ b/meta/recipes-core/busybox/files/mount.busybox | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | exec /bin/busybox mount $@ | ||
diff --git a/meta/recipes-core/busybox/files/run-ptest b/meta/recipes-core/busybox/files/run-ptest new file mode 100644 index 0000000000..3608a8eb65 --- /dev/null +++ b/meta/recipes-core/busybox/files/run-ptest | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | current_dir=$(readlink -f $0) | ||
4 | export bindir=$(dirname $current_dir) | ||
5 | |||
6 | cd testsuite || exit 1 | ||
7 | ./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/' | ||
diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script new file mode 100644 index 0000000000..78ac4242a8 --- /dev/null +++ b/meta/recipes-core/busybox/files/simple.script | |||
@@ -0,0 +1,86 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # udhcpc script edited by Tim Riker <Tim@Rikers.org> | ||
4 | |||
5 | [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 | ||
6 | |||
7 | RESOLV_CONF="/etc/resolv.conf" | ||
8 | [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" | ||
9 | [ -n "$subnet" ] && NETMASK="netmask $subnet" | ||
10 | |||
11 | # return 0 if root is mounted on a network filesystem | ||
12 | root_is_nfs() { | ||
13 | sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | | ||
14 | grep -q "^/ \(nfs\|smbfs\|ncp\|coda\)$" | ||
15 | } | ||
16 | |||
17 | have_bin_ip=0 | ||
18 | if [ -x /sbin/ip ]; then | ||
19 | have_bin_ip=1 | ||
20 | fi | ||
21 | |||
22 | case "$1" in | ||
23 | deconfig) | ||
24 | if [ -x /sbin/resolvconf ]; then | ||
25 | /sbin/resolvconf -d "${interface}.udhcpc" | ||
26 | fi | ||
27 | if ! root_is_nfs ; then | ||
28 | if [ $have_bin_ip -eq 1 ]; then | ||
29 | ip addr flush dev $interface | ||
30 | ip link set dev $interface up | ||
31 | else | ||
32 | /sbin/ifconfig $interface 0.0.0.0 | ||
33 | fi | ||
34 | fi | ||
35 | ;; | ||
36 | |||
37 | renew|bound) | ||
38 | if [ $have_bin_ip -eq 1 ]; then | ||
39 | ip addr add dev $interface local $ip/$mask $BROADCAST | ||
40 | else | ||
41 | /sbin/ifconfig $interface $ip $BROADCAST $NETMASK | ||
42 | fi | ||
43 | |||
44 | if [ -n "$router" ] ; then | ||
45 | if ! root_is_nfs ; then | ||
46 | if [ $have_bin_ip -eq 1 ]; then | ||
47 | while ip route del default 2>/dev/null ; do | ||
48 | : | ||
49 | done | ||
50 | else | ||
51 | while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do | ||
52 | : | ||
53 | done | ||
54 | fi | ||
55 | fi | ||
56 | |||
57 | metric=0 | ||
58 | for i in $router ; do | ||
59 | if [ $have_bin_ip -eq 1 ]; then | ||
60 | ip route add default via $i metric $metric | ||
61 | else | ||
62 | route add default gw $i dev $interface metric $metric 2>/dev/null | ||
63 | fi | ||
64 | metric=$(($metric + 1)) | ||
65 | done | ||
66 | fi | ||
67 | |||
68 | # Update resolver configuration file | ||
69 | R="" | ||
70 | [ -n "$domain" ] && R="domain $domain | ||
71 | " | ||
72 | for i in $dns; do | ||
73 | echo "$0: Adding DNS $i" | ||
74 | R="${R}nameserver $i | ||
75 | " | ||
76 | done | ||
77 | |||
78 | if [ -x /sbin/resolvconf ]; then | ||
79 | echo -n "$R" | /sbin/resolvconf -a "${interface}.udhcpc" | ||
80 | else | ||
81 | echo -n "$R" > "$RESOLV_CONF" | ||
82 | fi | ||
83 | ;; | ||
84 | esac | ||
85 | |||
86 | exit 0 | ||
diff --git a/meta/recipes-core/busybox/files/syslog b/meta/recipes-core/busybox/files/syslog new file mode 100644 index 0000000000..2944d3d06c --- /dev/null +++ b/meta/recipes-core/busybox/files/syslog | |||
@@ -0,0 +1,77 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: sysklogd | ||
4 | # Required-Start: $remote_fs $time | ||
5 | # Required-Stop: $remote_fs $time | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: System logger | ||
9 | ### END INIT INFO | ||
10 | |||
11 | set -e | ||
12 | |||
13 | if [ -f /etc/syslog-startup.conf ]; then | ||
14 | . /etc/syslog-startup.conf | ||
15 | LOG_LOCAL=0 | ||
16 | LOG_REMOTE=0 | ||
17 | for D in $DESTINATION; do | ||
18 | if [ "$D" = "buffer" ]; then | ||
19 | SYSLOG_ARGS="$SYSLOG_ARGS -C$BUFFERSIZE" | ||
20 | LOG_LOCAL=1 | ||
21 | elif [ "$D" = "file" ]; then | ||
22 | if [ -n "$LOGFILE" ]; then | ||
23 | SYSLOG_ARGS="$SYSLOG_ARGS -O $LOGFILE" | ||
24 | fi | ||
25 | if [ -n "$ROTATESIZE" ]; then | ||
26 | SYSLOG_ARGS="$SYSLOG_ARGS -s $ROTATESIZE" | ||
27 | fi | ||
28 | if [ -n "$ROTATEGENS" ]; then | ||
29 | SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS" | ||
30 | fi | ||
31 | LOCAL=0 | ||
32 | elif [ "$D" = "remote" ]; then | ||
33 | SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE" | ||
34 | LOG_REMOTE=1 | ||
35 | fi | ||
36 | done | ||
37 | if [ "$LOG_LOCAL" = "1" -a "$LOG_REMOTE" = "1" ]; then | ||
38 | SYSLOG_ARGS="$SYSLOG_ARGS -L" | ||
39 | fi | ||
40 | if [ "$REDUCE" = "yes" ]; then | ||
41 | SYSLOG_ARGS="$SYSLOG_ARGS -S" | ||
42 | fi | ||
43 | if [ "$DROPDUPLICATES" = "yes" ]; then | ||
44 | SYSLOG_ARGS="$SYSLOG_ARGS -D" | ||
45 | fi | ||
46 | if [ -n "$LOGLEVEL" ]; then | ||
47 | SYSLOG_ARGS="$SYSLOG_ARGS -l $LOGLEVEL" | ||
48 | fi | ||
49 | else | ||
50 | # default: log to 16K shm circular buffer | ||
51 | SYSLOG_ARGS="-C" | ||
52 | fi | ||
53 | |||
54 | case "$1" in | ||
55 | start) | ||
56 | echo -n "Starting syslogd/klogd: " | ||
57 | start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS | ||
58 | start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n | ||
59 | echo "done" | ||
60 | ;; | ||
61 | stop) | ||
62 | echo -n "Stopping syslogd/klogd: " | ||
63 | start-stop-daemon -K -n syslogd | ||
64 | start-stop-daemon -K -n klogd | ||
65 | echo "done" | ||
66 | ;; | ||
67 | restart) | ||
68 | $0 stop | ||
69 | $0 start | ||
70 | ;; | ||
71 | *) | ||
72 | echo "Usage: syslog { start | stop | restart }" >&2 | ||
73 | exit 1 | ||
74 | ;; | ||
75 | esac | ||
76 | |||
77 | exit 0 | ||
diff --git a/meta/recipes-core/busybox/files/syslog-startup.conf b/meta/recipes-core/busybox/files/syslog-startup.conf new file mode 100644 index 0000000000..fda450aa0d --- /dev/null +++ b/meta/recipes-core/busybox/files/syslog-startup.conf | |||
@@ -0,0 +1,13 @@ | |||
1 | # This configuration file is used by the busybox syslog init script, | ||
2 | # /etc/init.d/syslog[.busybox] to set syslog configuration at start time. | ||
3 | |||
4 | DESTINATION=file # log destinations (buffer file remote) | ||
5 | LOGFILE=/var/log/messages # where to log (file) | ||
6 | REMOTE=loghost:514 # where to log (syslog remote) | ||
7 | REDUCE=no # reduce-size logging | ||
8 | DROPDUPLICATES=no # whether to drop duplicate log entries | ||
9 | #ROTATESIZE=0 # rotate log if grown beyond X [kByte] | ||
10 | #ROTATEGENS=3 # keep X generations of rotated logs | ||
11 | BUFFERSIZE=64 # size of circular buffer [kByte] | ||
12 | FOREGROUND=no # run in foreground (don't use!) | ||
13 | #LOGLEVEL=5 # local log level (between 1 and 8) | ||
diff --git a/meta/recipes-core/busybox/files/syslog.conf b/meta/recipes-core/busybox/files/syslog.conf new file mode 100644 index 0000000000..75bb6309ab --- /dev/null +++ b/meta/recipes-core/busybox/files/syslog.conf | |||
@@ -0,0 +1 @@ | |||
# /etc/syslog.conf Configuration file for busybox's syslogd utility | |||
diff --git a/meta/recipes-core/busybox/files/umount.busybox b/meta/recipes-core/busybox/files/umount.busybox new file mode 100755 index 0000000000..f3731626e6 --- /dev/null +++ b/meta/recipes-core/busybox/files/umount.busybox | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | exec /bin/busybox umount $@ | ||