X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=services.mk;h=fb4f9e925cf33dbd15ebc1f6cbd1b70f4a0a5b4f;hb=3116e94e35ee7d8d3127a974d3a737fb5d2cc16c;hp=0938103b39a42830e5088e75d7024d7b303c22ca;hpb=814a952820e7406ae1e4327799841ef9c403ad59;p=mkinit diff --git a/services.mk b/services.mk index 0938103..fb4f9e9 100644 --- a/services.mk +++ b/services.mk @@ -1,4 +1,4 @@ -MKSHELL=/usr/lib/plan9/bin/rc +MKSHELL=/opt/plan9/bin/rc # Example #test-start:VQPservice -u: foo-start @@ -57,32 +57,48 @@ initctl-start:VPservice -u: boot service -U $target initctl-stop_cmd=fuser -k /dev/initctl -# Proc, mtab, udev, fstab +# Proc, mtab, fstab mounts-start:VPservice -u: boot $P cp /proc/mounts /etc/mtab - $P udevd --daemon + $P mdadm -A /dev/md4 /dev/sd[abc]4 $P mount -a service -U $target -# Load kernel modules -modules-start:VEPservice -u: boot - $P modprobe uvesafb +# Mount devtmpfs and shm/pts subfolders +devtmpfs-start:VEPservice -u: boot + $P mount /dev + $P mkdir /dev/shm + $P mkdir /dev/pts service -U $target -# Trigger udev uevents -uevents-start:VEPservice -u: mounts-start +# Start mdev as initial/daemon +mdev-start:VEPservice -u: mounts-start udev-stop + $P echo /sbin/mdev > /proc/sys/kernel/hotplug + $P mdev -s + service -U $target + +# Start udev and trigger events +udev-start:VEPservice -u: mounts-start + $P udevd --daemon $P udevadm trigger $P udevadm settle '--timeout=10' service -U $target +udev-stop_cmd=pkill udevd + +# Load kernel modules +modules-start:VEPservice -u: boot + $P modprobe uvesafb + $P modprobe evdev + service -U $target # Clean out /tmp and /var/run directories fsclean-start:VPservice -u: boot dirs=(/var/run /tmp) $P mkdir -p /.old - $P mv $dirs /.old + $P mv $dirs /.old || true $P mkdir -p $dirs $P chmod 1777 /tmp - $P install -m 1777 -d /var/run/screen # Fuck you Screen + $P install -m 777 -d /var/run/screen # Fuck you Screen $P exec rm -rf /.old & service -U $target @@ -92,14 +108,15 @@ getty-start:VEPservice -u: hostname-start utmp-start $P respawn /sbin/agetty 38400 tty5 linux $P respawn /sbin/agetty 38400 tty6 linux service -U $target -getty-stop_cmd=fuser -k /dev/tty4 /dev/tty5 /dev/tty6 +getty-stop_cmd=fuser -k /dev/tty3 /dev/tty4 /dev/tty5 /dev/tty6 # Spawn qingys for tty[23] -qingy-start:VEPservice -u: hostname-start utmp-start modules-start uevents-start +qingy-start:VEPservice -u: hostname-start utmp-start modules-start $P respawn /sbin/qingy tty2 - $P respawn /sbin/qingy tty3 + $P respawn /sbin/qingy tty3 -t + $P chvt 2 service -U $target -qingy-stop_cmd=fuser -k /dev/tty2 /dev/tty3 +qingy-stop_cmd=fuser -k /dev/tty2 # Login records utmp-start:VPservice -u: fsclean-start @@ -112,7 +129,7 @@ utmp-start:VPservice -u: fsclean-start utmp-stop_cmd=halt -w # CPU freq -cpufreq-start:VPservice -u: uevents-start +cpufreq-start:VPservice -u: mounts-start $P cpufreq-set -g ondemand service -U $target @@ -169,6 +186,12 @@ dbus-start:VPservice -u: fsclean-start localhost-start service -U $target dbus-stop_cmd=pkill dbus-daemon +gpm-start_cmd=gpm -m /dev/input/mice -t ps2 +gpm-stop_cmd=pkill gpm + +gpsd-start_cmd=gpsd tcp://localhost:2222 +gpsd-stop_cmd=pkill gpsd + keymap-start_cmd=loadkeys -u us-cc polipo-start:VPservice -u: localhost-start @@ -182,7 +205,11 @@ polipo-stop_cmd=pkill polipo apache2-start_cmd=apache2 apache2-stop_cmd=pkill apache2 -courier-start:VPservice -u: +#bitlbee-start_cmd=sudo -u bitlbee bitlbeed /usr/sbin/bitlbee +bitlbee-start_cmd=bitlbee -D -u bitlbee +bitlbee-stop_cmd=pkill bitlbee + +courier-start:VPservice -u: fsclean-start $P install -o mail -g mail -d /var/run/courier $P authdaemond start $P courier start @@ -194,25 +221,55 @@ courier-stop_cmd=pkill '(courier|authdaemon)' dhcp-start_cmd=dhcpcd eth0 dhcp-stop_cmd=dhcpcd eth0 -k +diod-start:VPservice -u: munged-start + $P diod --export-all + service -U $target +diod-stop_cmd=pkill diod + +dovecot-start_cmd=dovecot +dovecot-stop_cmd=pkill dovecot + +exim-start_cmd=exim -bd -q5m +exim-stop_cmd=pkill exim + +gitd-start:VPservice -u: boot + $P exec /usr/libexec/git-core/git-daemon \ + '--syslog' \ + '--export-all' \ + '--user-path=git' \ + '--base-path=/home/server/git' \ + '--listen=0.0.0.0' \ + '--user=nobody' \ + '--group=nobody' & + service -U $target +gitd-stop_cmd=pkill git-daemon + +munged-start_cmd=sudo -u munge -g munge munged +munged-stop_cmd=pkill munged + mysql-start:VPservice -u: fsclean-start $P install -o mysql -g mysql -d /var/run/mysqld - $P mysqld & + $P exec mysqld & service -U $target mysql-stop_cmd=pkill mysqld -spam-start:VPservice -u: - $P spamd -d - service -U $target -spam-stop_cmd=pkill spamd +ntpd-start_cmd=ntpd +ntpd-stop_cmd=pkill ntpd + +privoxy-start_cmd=privoxy --user privoxy.privoxy /etc/privoxy/config +privoxy-stop_cmd=pkill privoxy + +spamd-start_cmd=spamd -u spamd -d +spamd-stop_cmd=pkill spamd + +tftpd-start_cmd=in.tftpd -s -l /img/boot +tftpd-stop_cmd= -tor-start:VPservice -u: +tor-start:VPservice -u: boot $P exec tor & service -U $target tor-stop_cmd=pkill tor -privoxy-start_cmd=privoxy --user privoxy.privoxy /etc/privoxy/config -privoxy-stop_cmd=pkill privoxy - # Library # ------- %-start:QVPservice -u: boot