]> Pileus Git - mkinit/commitdiff
Misc updates
authorAndy Spencer <andy753421@gmail.com>
Mon, 18 Mar 2013 01:17:10 +0000 (01:17 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 18 Mar 2013 01:17:10 +0000 (01:17 +0000)
- Add .gitignore
- Add dioc and wpa services
- Misc service updates
- Fix build/install

.gitignore [new file with mode: 0644]
init.mk
mkfile
services.mk

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..b08d8de
--- /dev/null
@@ -0,0 +1,3 @@
+*~
+*.o
+src/initctld
diff --git a/init.mk b/init.mk
index 80c1224b1db9f7721ce51ef6d28a960352af2d52..cf939fc6f0271bc8649af564de94d01bf14b9c41 100644 (file)
--- a/init.mk
+++ b/init.mk
@@ -12,8 +12,8 @@ apache2-opts  = -DSSL -DPHP5
 #   single─bare─system─┬─desktop─>
 #                      └─server──>
 server  = apache2 bitlbee dhcp dovecot exim gitd mysql ntpd spamd
-desktop = alsa dbus getty gpm keymap qingy
-system  = at cron hddtemp hwclock sshd swap syslog
+desktop = alsa dhcp getty gpm keymap qingy
+system  = at cron hddtemp hwclock sshd swap sysctl syslog
 bare    = cpufreq fsclean hostname initctl localhost mdev modules mounts utmp
 
 default:V: desktop
@@ -25,4 +25,4 @@ bare:V:    `{echo $server^-stop  $desktop^-stop  $system^-stop  $bare^-start}
 single:V:  `{echo $server^-stop  $desktop^-stop  $system^-stop  $bare^-stop }
 
 # Include services
-</scratch/lug/mkinit/services.mk
+</etc/services.mk
diff --git a/mkfile b/mkfile
index b332d0279a6b617cc0334f6b52b3959ab8f6ed26..f307ef50ce2377472d75124e6d56ba5970b63428 100644 (file)
--- a/mkfile
+++ b/mkfile
@@ -1,29 +1,23 @@
-# Copyright (C) 2009 Andy Spencer
+# Copyright (C) 2009,2013 Andy Spencer
 # See COPYING for terms
 
-PROGS=src/initctld
-CLEAN=src/*.o
+all:V: src/initctld
 
-default:V: all
+src/initctld: src/initctld.c
+       gcc -Wall -o $target $prereq
 
 install:V: all
-       install -d \
-               $DESTDIR/etc \
-               $DESTDIR/sbin \
-               $DESTDIR/lib/mkinit/bin \
-               $DESTDIR/lib/mkinit/state
-       install -t $DESTDIR/lib/mkinit/bin \
-               ./src/{mkinit,service,respawn,initctld}
-       #install -t $DESTDIR/etc  ./init.mk       
-       ln -sf $DESTDIR/lib/mkinit/bin/mkinit $DESTDIR/sbin
+       install -d $DESTDIR/lib/mkinit/state
+       install -m 755 -D src/mkinit   $DESTDIR/sbin/mkinit
+       install -m 755 -D src/service  $DESTDIR/lib/mkinit/bin/service
+       install -m 755 -D src/respawn  $DESTDIR/lib/mkinit/bin/respawn
+       install -m 755 -D src/initctld $DESTDIR/lib/mkinit/bin/initctld
+       install -m 644 -D init.mk      $DESTDIR/etc/init.mk.example
+       install -m 644 -D services.mk  $DESTDIR/etc/services.mk.example
 
 uninstall:VE:
-       rm -rf /lib/mkinit/bin/
-       rm /lib/mkinit/cmd
-       rm /sbin/mkinit
-       rmdir /lib/mkinit/state/
-       rmdir /lib/mkinit/
+       rm -rf $DESTDIR/lib/mkinit
+       rm $DESTDIR/sbin/mkinit
 
-<../mkcommon
-
-# vim: ft=mk
+clean:
+       rm -f src/initctld
index fb4f9e925cf33dbd15ebc1f6cbd1b70f4a0a5b4f..920fe1762feb477cd219a849fd68558ab3fb7150 100644 (file)
@@ -31,13 +31,13 @@ boot:VEPservice -u: /
 # Kill all process, then remount and sync
 halt:QVE: utmp-stop hwclock-stop alsa-stop
        echo TERMinating all processes
-       $P pkill -15 -vg0 >/dev/null >[2=1]
+       $P pkill -15 --inverse -g0 >/dev/null >[2=1]
        for (i in 1 2 3 4 5)
-               $P pgrep -vg0 >/dev/null >[2=1] && $P sleep 1
+               { $P pgrep -vg0 && $P sleep 1 }
        echo KILLing all processes
-       $P pkill  -9 -vg0 >/dev/null >[2=1]
+       $P pkill  -9 --inverse -g0 >/dev/null >[2=1]
        for (i in 1 2 3)
-               $P pgrep -vg0 >/dev/null >[2=1] && $P sleep 1
+               { $P pgrep -vg0 && $P sleep 1 }
        service -F
        echo Remounting read-only
        $P mount -o remount,ro /
@@ -72,7 +72,7 @@ devtmpfs-start:VEPservice -u: boot
        service -U $target
 
 # Start mdev as initial/daemon
-mdev-start:VEPservice -u: mounts-start udev-stop
+mdev-start:VEPservice -u: mounts-start
        $P echo /sbin/mdev > /proc/sys/kernel/hotplug
        $P mdev -s
        service -U $target
@@ -102,21 +102,22 @@ fsclean-start:VPservice -u: boot
        $P exec rm -rf /.old &
        service -U $target
 
-# Spawn gettys for tty[456]
+# Spawn gettys for tty[23456]
 getty-start:VEPservice -u: hostname-start utmp-start
-       $P respawn /sbin/agetty 38400 tty4 linux
-       $P respawn /sbin/agetty 38400 tty5 linux
-       $P respawn /sbin/agetty 38400 tty6 linux
+       $P respawn setsid agetty 38400 tty2 linux
+       $P respawn setsid agetty 38400 tty3 linux
+       $P respawn setsid agetty 38400 tty4 linux
+       $P respawn setsid agetty 38400 tty5 linux
+       $P respawn setsid agetty 38400 tty6 linux
        service -U $target
-getty-stop_cmd=fuser -k /dev/tty3 /dev/tty4 /dev/tty5 /dev/tty6
+getty-stop_cmd=fuser -k /dev/tty2 /dev/tty3 /dev/tty4 /dev/tty5 /dev/tty6
 
-# Spawn qingys for tty[23]
+# Spawn qingys for tty[7]
 qingy-start:VEPservice -u: hostname-start utmp-start modules-start
-       $P respawn /sbin/qingy tty2
-       $P respawn /sbin/qingy tty3 -t
-       $P chvt 2
+       $P respawn setsid /sbin/qingy-DirectFB tty7 &
+       $P chvt 7
        service -U $target
-qingy-stop_cmd=fuser -k /dev/tty2
+qingy-stop_cmd=fuser -k /dev/tty7
 
 # Login records
 utmp-start:VPservice -u: fsclean-start
@@ -141,7 +142,11 @@ localhost-stop_cmd=ifconfig lo down
 hostname-start_cmd=hostname
 
 # Kernel parameters
-sysctl-start_cmd=sysctl -p
+sysctl-start:VPservice -u: mounts-start
+       $P sysctl -p
+       $P chmod a+w /sys/class/leds/smc::kbd_backlight/brightness
+       $P chmod a+w /sys/class/backlight/gmux_backlight/brightness
+       service -U $target
 
 
 # System
@@ -221,6 +226,15 @@ courier-stop_cmd=pkill '(courier|authdaemon)'
 dhcp-start_cmd=dhcpcd eth0
 dhcp-stop_cmd=dhcpcd eth0 -k
 
+dioc-start:VPservice -u: munged-start
+       $P mount -n /mnt/c
+       $P mount -n /mnt/c/mnt/x
+       service -U $target
+dioc-stop:EVPservice -d:
+       $P umount /mnt/c/mnt/x
+       $P umount /mnt/c
+       service -D $target
+
 diod-start:VPservice -u: munged-start
        $P diod --export-all
        service -U $target
@@ -244,7 +258,10 @@ gitd-start:VPservice -u: boot
        service -U $target
 gitd-stop_cmd=pkill git-daemon
 
-munged-start_cmd=sudo -u munge -g munge munged
+munged-start:VPservice -u: boot
+       $P install -o munge -g munge -d /var/run/munge
+       $P sudo -u munge -g munge munged
+       service -U $target
 munged-stop_cmd=pkill munged
 
 mysql-start:VPservice -u: fsclean-start
@@ -270,6 +287,12 @@ tor-start:VPservice -u: boot
        service -U $target
 tor-stop_cmd=pkill tor
 
+wpa-start:VPservice -u: mdev-start
+       $P modprobe b43
+       $P exec wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &
+       service -U $target
+wpa-stop_cmd=pkill wpa
+
 # Library 
 # -------
 %-start:QVPservice -u: boot
@@ -280,8 +303,9 @@ tor-stop_cmd=pkill tor
 
 %-stop:QVPservice -d: /
        if (~ $#($stem^-stop_cmd) 0)
-               echo No such service $stem && exit 0
-       $P $($stem^-stop_cmd)
+               echo No such service $stem
+       if not
+               $P $($stem^-stop_cmd)
        service -D $target
 
 %-zap:QVPservice -d: /