diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
commit | 2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch) | |
tree | a63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /core/busybox-initscripts | |
parent | e374901731eb35599bd6735de4dd38560e3a79b8 (diff) | |
download | aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2 aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz |
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'core/busybox-initscripts')
22 files changed, 0 insertions, 552 deletions
diff --git a/core/busybox-initscripts/APKBUILD b/core/busybox-initscripts/APKBUILD deleted file mode 100644 index 6dc784924d..0000000000 --- a/core/busybox-initscripts/APKBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=busybox-initscripts -pkgver=2.0 -pkgrel=2 -pkgdesc="Init scripts for busybox daemons" -url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts" -license="GPL-2" -depends="busybox" -makedepends= -install=$pkgname.post-install -subpackages= -source="cron.initd dnsd.initd httpd.initd inetd.initd klogd.initd - mdev-mount.initd mdev.initd rdate.initd syslog.initd watchdog.initd - cron.confd klogd.confd rdate.confd syslog.confd watchdog.confd - mdev.conf dvbdev ide_links usbdev usbdisk_link - $install" - -build() { - local i - cd "$srcdir" - - mkdir -p "$pkgdir"/etc/conf.d "$pkgdir"/etc/init.d "$pkgdir"/lib/mdev - for i in *.initd; do - install -m755 "$srcdir"/$i "$pkgdir"/etc/init.d/${i%.*} || return 1 - done - for i in *.confd; do - install -m644 "$srcdir"/$i "$pkgdir"/etc/conf.d/${i%.*} || return 1 - done - install -m644 mdev.conf "$pkgdir"/etc - install -m755 dvbdev ide_links usbdev usbdisk_link "$pkgdir"/lib/mdev/ -} - -md5sums="45b4ca78fad54f56018b9a2e9358dc68 cron.initd -3af526f4de1a607f7932a15f7c8e8eb1 dnsd.initd -f7daf05f9984aa398fdbd3fe02e82678 httpd.initd -dad8e381142dfb42483de324aff4cf28 inetd.initd -e22077bfe7b8b0fe7c06cfe208e68dca klogd.initd -12379687c0cfb5446e0cfc20bd6992bb mdev-mount.initd -ef3e93fe17964dd600364b1340654b5b mdev.initd -533288e7df1fdfc029b1048b8e6c770f rdate.initd -b5b23dd06cea120bd8d850b54bca0b59 syslog.initd -254186e513ff9fb9ede6a2e92257b247 watchdog.initd -8ddb8d040c9c7a32c63039a2c80ff496 cron.confd -60bc14cc3163d76f41bcc93dc0f9984b klogd.confd -22adbf155ffc4595206ded6daad07812 rdate.confd -77fb31a75511247bf4e3430565a276bc syslog.confd -0bb55dde32f5e119111fa4938daaef3d watchdog.confd -022b670c549e402573797cc72fa12032 mdev.conf -ad1556961294e4aa2abca6be52138b7c dvbdev -5c8725b4cbdeda23b00f08124a0d20bf ide_links -1acfd58dfd1cf324c90ca3a3be519510 usbdev -30b0c85956b6701caf55309a17e537f6 usbdisk_link -038db8453f57a36afaee2a4d883008e4 busybox-initscripts.post-install" diff --git a/core/busybox-initscripts/busybox-initscripts.post-install b/core/busybox-initscripts/busybox-initscripts.post-install deleted file mode 100644 index 11575f58b9..0000000000 --- a/core/busybox-initscripts/busybox-initscripts.post-install +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# this is for upgraders -if [ -L /etc/runlevels/boot/mdev ]; then - mkdir -p /etc/runlevels/sysinit - mv /etc/runlevels/boot/mdev /etc/runlevels/sysinit/ 2>/dev/null -fi -exit 0 - diff --git a/core/busybox-initscripts/cron.confd b/core/busybox-initscripts/cron.confd deleted file mode 100644 index 2f2eb7bb75..0000000000 --- a/core/busybox-initscripts/cron.confd +++ /dev/null @@ -1,3 +0,0 @@ -# enter the cron options -CRON_OPTS="-c /etc/crontabs" - diff --git a/core/busybox-initscripts/cron.initd b/core/busybox-initscripts/cron.initd deleted file mode 100644 index ffae38b806..0000000000 --- a/core/busybox-initscripts/cron.initd +++ /dev/null @@ -1,14 +0,0 @@ -#!/sbin/runscript - -start() { - ebegin "Starting busybox cron" - start-stop-daemon --start --exec /usr/sbin/crond -- $CRON_OPTS - eend $? -} - -stop () { - ebegin "Stopping busybox cron" - start-stop-daemon --stop --exec crond - eend $? -} - diff --git a/core/busybox-initscripts/dnsd.initd b/core/busybox-initscripts/dnsd.initd deleted file mode 100644 index 8d625f9e5e..0000000000 --- a/core/busybox-initscripts/dnsd.initd +++ /dev/null @@ -1,17 +0,0 @@ -#!/sbin/runscript - -depend() { - need net -} - -start() { - ebegin "Starting dnsd" - start-stop-daemon --start --exec /usr/sbin/dnsd -- -d $DNSD_OPTS - eend $? -} - -stop () { - ebegin "Stopping dnsd" - start-stop-daemon --stop --exec /usr/sbin/dnsd - eend $? -} diff --git a/core/busybox-initscripts/dvbdev b/core/busybox-initscripts/dvbdev deleted file mode 100644 index f0186c176c..0000000000 --- a/core/busybox-initscripts/dvbdev +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# MDEV=dvb0.demux1 -> ADAPTER=dvb0 -> N=0 -ADAPTER=${MDEV%.*} -N=${ADAPTER#dvb} -# MDEV=dvb0.demux1 -> DEVB_DEV=demux1 -DVB_DEV=${MDEV#*.} - -case "$ACTION" in - add|"") - mkdir -p dvb/adapter${N} - mv ${MDEV} dvb/adapter${N}/${DVB_DEV} - ;; - remove) - rm -f dvb/adapter${N}/${DVB_DEV} - rmdir dvb/adapter${N} 2>/dev/null - rmdir dvb/ 2>/dev/null -esac diff --git a/core/busybox-initscripts/httpd.initd b/core/busybox-initscripts/httpd.initd deleted file mode 100644 index 7f114e650c..0000000000 --- a/core/busybox-initscripts/httpd.initd +++ /dev/null @@ -1,20 +0,0 @@ -#!/sbin/runscript - -DAEMON=/usr/sbin/httpd - -depend() { - need net -} - -start() { - ebegin "Starting busybox httpd" - start-stop-daemon --start --exec $DAEMON -- $HTTPD_OPTS - eend $? -} - -stop () { - ebegin "Stopping busybox httpd" - start-stop-daemon --stop --exec $DAEMON - eend $? -} - diff --git a/core/busybox-initscripts/ide_links b/core/busybox-initscripts/ide_links deleted file mode 100644 index be0c95aa9c..0000000000 --- a/core/busybox-initscripts/ide_links +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -[ -f /proc/ide/$MDEV/media ] || exit - -media=`cat /proc/ide/$MDEV/media` -for i in $media $media[0-9]* ; do - if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then - LINK=$i - break - fi -done - -# link exist, remove if necessary and exit -if [ "$LINK" ] ; then - [ "$ACTION" = remove ] && rm $LINK - exit -fi - -# create a link -num=`ls $media[0-9]* 2>/dev/null | wc -l` -ln -sf $MDEV "$media`echo $num`" -[ -e "$media" ] || ln -sf $MDEV "$media" - diff --git a/core/busybox-initscripts/inetd.initd b/core/busybox-initscripts/inetd.initd deleted file mode 100644 index b5cf9d7d3e..0000000000 --- a/core/busybox-initscripts/inetd.initd +++ /dev/null @@ -1,18 +0,0 @@ -#!/sbin/runscript - -depend() { - need net -} - -start() { - ebegin "Starting busybox inetd" - start-stop-daemon --start --exec /usr/sbin/inetd -- $INETD_OPTS - eend $? -} - -stop () { - ebegin "Stopping busybox inetd" - start-stop-daemon --stop --exec /usr/sbin/inetd - eend $? -} - diff --git a/core/busybox-initscripts/klogd.confd b/core/busybox-initscripts/klogd.confd deleted file mode 100644 index 100deedaac..0000000000 --- a/core/busybox-initscripts/klogd.confd +++ /dev/null @@ -1 +0,0 @@ -KLOGD_OPTS="" diff --git a/core/busybox-initscripts/klogd.initd b/core/busybox-initscripts/klogd.initd deleted file mode 100644 index 5cf7e6fd16..0000000000 --- a/core/busybox-initscripts/klogd.initd +++ /dev/null @@ -1,20 +0,0 @@ -#!/sbin/runscript - -depend() { - need clock hostname - provide logger - keyword novserver -} - -start() { - ebegin "Starting busybox kernel logging" - start-stop-daemon --start --exec /sbin/klogd -- ${KLOGD_OPTS} - eend $? -} - -stop () { - ebegin "Stopping busybox kernel logging" - start-stop-daemon --stop --exec /sbin/klogd - eend $? -} - diff --git a/core/busybox-initscripts/mdev-mount.initd b/core/busybox-initscripts/mdev-mount.initd deleted file mode 100644 index c7aaa824c2..0000000000 --- a/core/busybox-initscripts/mdev-mount.initd +++ /dev/null @@ -1,64 +0,0 @@ -#!/sbin/runscript -# Largely based on Gentoo's udev-mount -# -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# - -description="Mount tmpfs on /dev" - -mount_dev_directory() -{ - if [ "$(mountinfo -t /dev)" = "mdev" ]; then - # already mounted - if fstabinfo --quiet /dev; then - mount -o remount -n /dev - fi - return 0 - fi - - # No options are processed here as they should all be in /etc/fstab - ebegin "Mounting /dev" - mkdir -p /dev - if fstabinfo --quiet /dev; then - mount -n /dev - else - # Some devices require exec, Bug #92921 - mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=1M" mdev /dev - fi - eend $? -} - -seed_dev() -{ - # Seed /dev with some things that we know we need - - # creating /dev/console, /dev/tty and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before udevd creates it - [ -c /dev/console ] || mknod -m 600 /dev/console c 5 1 - [ -c /dev/tty1 ] || mknod -m 620 /dev/tty1 c 4 1 - [ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ -c /dev/null ] || mknod -m 666 /dev/null c 1 3 - - # so udev can add its start-message to dmesg - [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11 - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm - return 0 -} - -start() { - mount_dev_directory || return 1 - seed_dev -} diff --git a/core/busybox-initscripts/mdev.conf b/core/busybox-initscripts/mdev.conf deleted file mode 100644 index 6ee65a20e5..0000000000 --- a/core/busybox-initscripts/mdev.conf +++ /dev/null @@ -1,100 +0,0 @@ -# -# This is a sample mdev.conf. -# - -# Devices: -# Syntax: %s %d:%d %s -# devices user:group mode - -# null does already exist; therefore ownership has to be changed with command -null root:root 0666 @chmod 666 $MDEV -zero root:root 0666 -grsec root:root 0660 -full root:root 0666 - -random root:root 0666 -urandom root:root 0444 -hwrandom root:root 0660 - -# console does already exist; therefore ownership has to be changed with command -console root:tty 0600 @chmod 600 $MDEV && mkdir -p vc && ln -sf ../$MDEV vc/0 -fd0 root:floppy 0660 -kmem root:root 0640 -mem root:root 0640 -port root:root 0640 -ptmx root:tty 0666 - -# ram.* -ram([0-9]*) root:disk 0660 >rd/%1 -loop([0-9]+) root:disk 0660 >loop/ -sd[a-z].* root:disk 0660 */lib/mdev/usbdisk_link -hd[a-z][0-9]* root:disk 0660 */lib/mdev/ide_links -md[0-9] root:disk 0660 - -tty root:tty 0666 -tty[0-9] root:root 0600 -tty[0-9][0-9] root:tty 0660 -ttyS[0-9]* root:uucp 0660 -pty.* root:tty 0660 -vcs[0-9]* root:tty 0660 -vcsa[0-9]* root:tty 0660 - - -ttyLTM[0-9] root:dialout 0660 @ln -sf $MDEV modem -ttySHSF[0-9] root:dialout 0660 @ln -sf $MDEV modem -slamr root:dialout 0660 @ln -sf $MDEV slamr0 -slusb root:dialout 0660 @ln -sf $MDEV slusb0 -fuse root:root 0666 - -# dri device -card[0-9] root:video 0660 =dri/ - -# alsa sound devices and audio stuff -pcm.* root:audio 0660 =snd/ -control.* root:audio 0660 =snd/ -midi.* root:audio 0660 =snd/ -seq root:audio 0660 =snd/ -timer root:audio 0660 =snd/ - -adsp root:audio 0660 >sound/ -audio root:audio 0660 >sound/ -dsp root:audio 0660 >sound/ -mixer root:audio 0660 >sound/ -sequencer.* root:audio 0660 >sound/ - -# misc stuff -agpgart root:root 0660 >misc/ -psaux root:root 0660 >misc/ -rtc root:root 0664 >misc/ - -# input stuff -event[0-9]+ root:root 0640 =input/ -mice root:root 0640 =input/ -mouse[0-9] root:root 0640 =input/ -ts[0-9] root:root 0600 =input/ - -# v4l stuff -vbi[0-9] root:video 0660 >v4l/ -video[0-9] root:video 0660 >v4l/ - -# dvb stuff -dvb.* root:video 0660 */lib/mdev/dvbdev - -# load drivers for usb devices -usbdev[0-9].[0-9] root:root 0660 */lib/mdev/usbdev -usbdev[0-9].[0-9]_.* root:root 0660 - -# net devices -tun[0-9]* root:root 0600 =net/ -tap[0-9]* root:root 0600 =net/ - -# zaptel devices -zap(.*) root:dialout 0660 =zap/%1 -dahdi!(.*) root:dialout 0660 =dahdi/%1 - -# raid controllers -cciss!(.*) root:disk 0660 =cciss/%1 -ida!(.*) root:disk 0660 =ida/%1 -rd!(.*) root:disk 0660 =rd/%1 - -sr[0-9] root:cdrom 0660 >cdrom diff --git a/core/busybox-initscripts/mdev.initd b/core/busybox-initscripts/mdev.initd deleted file mode 100644 index e9309c7006..0000000000 --- a/core/busybox-initscripts/mdev.initd +++ /dev/null @@ -1,33 +0,0 @@ -#!/sbin/runscript - -depend() { - provide dev - need sysfs mdev-mount - before checkfs fsck - keyword novserver -} - -start() { - # check if udev is specified on cmd line - if get_bootparam "udev"; then - ewarn "Skipping mdev as udev requested in kernel cmdline" - return 0 - fi - - ebegin "Starting busybox mdev" - mkdir -p /dev - - # use mdev for hotplug - echo "/sbin/mdev" > /proc/sys/kernel/hotplug - - # create devices - mdev -s - eend $? -} - -stop() { - ebegin "Stopping busybox mdev" - echo "" > /proc/sys/kernel/hotplug - eend -} - diff --git a/core/busybox-initscripts/rdate.confd b/core/busybox-initscripts/rdate.confd deleted file mode 100644 index 93c6786169..0000000000 --- a/core/busybox-initscripts/rdate.confd +++ /dev/null @@ -1,2 +0,0 @@ -# Set the ntp server here -NTP_HOST=pool.net.org diff --git a/core/busybox-initscripts/rdate.initd b/core/busybox-initscripts/rdate.initd deleted file mode 100644 index 3e6c6582c9..0000000000 --- a/core/busybox-initscripts/rdate.initd +++ /dev/null @@ -1,12 +0,0 @@ -#!/sbin/runscript - -start() { - if [ -z "$NTP_HOST" ] ; then - eerror "Please set NTP_HOST in /etc/conf.d/rdate" - return 1 - fi - ebegin "Running busybox rdate" - rdate "$NTP_HOST" - eend $? -} - diff --git a/core/busybox-initscripts/syslog.confd b/core/busybox-initscripts/syslog.confd deleted file mode 100644 index 5f23b819d5..0000000000 --- a/core/busybox-initscripts/syslog.confd +++ /dev/null @@ -1 +0,0 @@ -SYSLOGD_OPTS="" diff --git a/core/busybox-initscripts/syslog.initd b/core/busybox-initscripts/syslog.initd deleted file mode 100644 index 390cd6def3..0000000000 --- a/core/busybox-initscripts/syslog.initd +++ /dev/null @@ -1,19 +0,0 @@ -#!/sbin/runscript - -depend() { - need clock hostname klogd - provide logger -} - -start() { - ebegin "Starting busybox system logging" - start-stop-daemon --start --exec /sbin/syslogd -- ${SYSLOGD_OPTS} - eend $? -} - -stop () { - ebegin "Stopping busybox system logging" - start-stop-daemon --stop --exec /sbin/syslogd - eend $? -} - diff --git a/core/busybox-initscripts/usbdev b/core/busybox-initscripts/usbdev deleted file mode 100644 index b1aff296cd..0000000000 --- a/core/busybox-initscripts/usbdev +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -# script is buggy; until patched just do exit 0 -#exit 0 - -# add zeros to device or bus -add_zeros () { - case "$(echo $1 | wc -L)" in - 1) echo "00$1" ;; - 2) echo "0$1" ;; - *) echo "$1" - esac - exit 0 -} - - -# bus and device dirs in /sys -local USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/') -USB_PATH=$(find /sys/devices -type d -name "$USB_PATH") -local USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/') - -# dir names in /dev -local BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/')) -local USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/')) - - -# try to load the proper driver for usb devices -case "$ACTION" in - add|"") - # load usb bus driver - for i in $USB_PATH/*/modalias ; do - modprobe `cat $i` 2>/dev/null - done - # load usb device driver if existent - if [ -d $USB_PATH/$USB_DEV_DIR ]; then - for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do - modprobe `cat $i` 2>/dev/null - done - fi - # move usb device file - mkdir -p bus/usb/$BUS - mv $MDEV bus/usb/$BUS/$USB_DEV - ;; - remove) - # unload device driver, if device dir is existent - if [ -d $USB_PATH/$USB_DEV_DIR ]; then - for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do - modprobe -r `cat $i` 2>/dev/null - done - fi - # unload usb bus driver. Does this make sense? - # what happens, if two usb devices are plugged in - # and one is removed? - for i in $USB_PATH/*/modalias ; do - modprobe -r `cat $i` 2>/dev/null - done - # remove device file and possible empty dirs - rm -f bus/usb/$BUS/$USB_DEV - rmdir bus/usb/$BUS/ 2>/dev/null - rmdir bus/usb/ 2>/dev/null - rmdir bus/ 2>/dev/null -esac diff --git a/core/busybox-initscripts/usbdisk_link b/core/busybox-initscripts/usbdisk_link deleted file mode 100644 index 750242bb5c..0000000000 --- a/core/busybox-initscripts/usbdisk_link +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars. - -current=$(readlink usbdisk) - -if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then - rm -f usbdisk usba1 -fi -[ -n "$current" ] && exit - -if [ -e /sys/block/$MDEV ]; then - SYSDEV=$(readlink -f /sys/block/$MDEV/device) - # if /sys device path contains '/usb[0-9]' then we assume its usb - # also, if its an usb without partitions we require FAT - if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then - # do not create link if there is not FAT - dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0 - - ln -sf $MDEV usbdisk - # keep this for compat. people have it in fstab - ln -sf $MDEV usba1 - fi - -elif [ -e /sys/block/*/$MDEV ] ; then - PARENT=$(dirname /sys/block/*/$MDEV) - SYSDEV=$(readlink -f $PARENT/device) - if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then - ln -sf $MDEV usbdisk - # keep this for compat. people have it in fstab - ln -sf $MDEV usba1 - fi -fi - diff --git a/core/busybox-initscripts/watchdog.confd b/core/busybox-initscripts/watchdog.confd deleted file mode 100644 index 5cfd2c2cc4..0000000000 --- a/core/busybox-initscripts/watchdog.confd +++ /dev/null @@ -1,3 +0,0 @@ -#WATCHDOG_OPTS="-t 30" -WATCHDOG_DEV="" - diff --git a/core/busybox-initscripts/watchdog.initd b/core/busybox-initscripts/watchdog.initd deleted file mode 100644 index 7363bb7553..0000000000 --- a/core/busybox-initscripts/watchdog.initd +++ /dev/null @@ -1,25 +0,0 @@ -#!/sbin/runscript - -depend() { - need dev - after hwdrivers -} - -start() { - if ! [ -n "$WATCHDOG_DEV" ]; then - eerror "WATCHDOG_DEV is not set" - return 1 - fi - - ebegin "Starting busybox watchdog" - start-stop-daemon --start --exec /sbin/watchdog \ - -- $WATCHDOG_OPTS $WATCHDOG_DEV - eend $? -} - -stop () { - ebegin "Stopping busybox watchdog" - start-stop-daemon --stop --exec /sbin/watchdog - eend $? -} - |