initng: daemon daemon/agetty.i daemon/alsasound.i daemon/ap-fcgi.i daemon/apache.i daemon/autofs.i d...

glen cvs at pld-linux.org
Wed Dec 7 23:40:48 CET 2005


Author: glen
Date: Wed Dec  7 23:40:36 2005
New Revision: 6612

Added:
   initng/daemon/
   initng/daemon/agetty.i
   initng/daemon/alsasound.i
   initng/daemon/ap-fcgi.i
   initng/daemon/apache.i
   initng/daemon/autofs.i
   initng/daemon/bnc.i
   initng/daemon/bopm.i
   initng/daemon/clamd.i
   initng/daemon/console.i
   initng/daemon/courier-authlib.i
   initng/daemon/courier-imap-ssl.i
   initng/daemon/courier-imap.i
   initng/daemon/cpusets.i
   initng/daemon/crond.i
   initng/daemon/cupsd.i
   initng/daemon/dhcpd.i
   initng/daemon/dpcproxy.i
   initng/daemon/dspam.i
   initng/daemon/eventum-irc.i
   initng/daemon/famd.i
   initng/daemon/freevo.i
   initng/daemon/freevo_dep.i
   initng/daemon/freevo_recordserver.i
   initng/daemon/freevo_webserver.i
   initng/daemon/gpm.i
   initng/daemon/hotplug.i
   initng/daemon/httpd.i
   initng/daemon/imapproxy.i
   initng/daemon/ip6tables.i
   initng/daemon/iptables.i
   initng/daemon/jserv.i
   initng/daemon/kdm.i
   initng/daemon/klogd.i
   initng/daemon/lighttpd.i
   initng/daemon/lisa.i
   initng/daemon/mdns.i
   initng/daemon/messagebus.i
   initng/daemon/mldonkey.i
   initng/daemon/monit.i
   initng/daemon/mysql.i
   initng/daemon/mythbackend.i   (contents, props changed)
   initng/daemon/nagios.i
   initng/daemon/named.i
   initng/daemon/nessusd.i
   initng/daemon/network.i
   initng/daemon/nfsfs.i
   initng/daemon/nrpe.i
   initng/daemon/ntpd.i
   initng/daemon/openvpn.i
   initng/daemon/polipo.i
   initng/daemon/portmap.i
   initng/daemon/postfix.i
   initng/daemon/pound.i
   initng/daemon/preload.i
   initng/daemon/pure-ftpd.i
   initng/daemon/rc-inetd.i
   initng/daemon/rdate.i
   initng/daemon/samba.i
   initng/daemon/saslauthd.i
   initng/daemon/serial.i
   initng/daemon/slapd.i
   initng/daemon/snmpd.i
   initng/daemon/spamd.i
   initng/daemon/squid.i
   initng/daemon/sshd.i
   initng/daemon/svscan.i
   initng/daemon/syslog-ng.i
   initng/daemon/syslog.i
   initng/daemon/sysstat.i
   initng/daemon/tenshi.i
   initng/daemon/timezone.i
   initng/daemon/tuxaator.i
   initng/daemon/uml.i
   initng/daemon/vprocunhide.i
   initng/daemon/vservers.i
   initng/daemon/xend.i
   initng/daemon/xendomains.i
   initng/daemon/xfs.i
   initng/daemon/yum.i
   initng/default.runlevel
   initng/migrate_rc.d-initng.i.sh   (contents, props changed)
   initng/net/
   initng/net/net.i
   initng/shutdown_script   (contents, props changed)
   initng/single.runlevel
   initng/system/
   initng/system.runlevel
   initng/system/allowlogin.i
   initng/system/checkroot.i
   initng/system/cleanfs.i
   initng/system/clock.i
   initng/system/coldplug.i
   initng/system/consolefont.i
   initng/system/dmesg.i
   initng/system/hdparm.i
   initng/system/hostname.i
   initng/system/initial.i
   initng/system/local.i
   initng/system/localmount.i
   initng/system/modules.i
   initng/system/mountdev.i
   initng/system/mountfs.i
   initng/system/mountroot.i
   initng/system/mymount.i
   initng/system/rundir.i
   initng/system/single.i
   initng/system/static-modules.i
   initng/system/swap.i
   initng/system/sysinit.i
   initng/system/timezone.i
   initng/vserver.runlevel
Log:
- imported from my private CVS


Added: initng/daemon/agetty.i
==============================================================================
--- (empty file)
+++ initng/daemon/agetty.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,19 @@
+#service daemon/agetty/tty1 {
+#	need = system/mountfs
+#	daemon  = /sbin/agetty
+#	daemon_args = 38400 $NAME
+#	respawn
+#	last
+#}
+
+daemon daemon/agetty/* {
+	need = system/mountroot system/hostname;
+	exec daemon = /sbin/agetty;
+	exec_args daemon = 38400 $NAME linux;
+	respawn;
+}
+
+virtual daemon/agetty {
+	need = daemon/agetty/tty2 daemon/agetty/tty3 daemon/agetty/tty4;
+	use = system/mountroot;
+}

Added: initng/daemon/alsasound.i
==============================================================================
--- (empty file)
+++ initng/daemon/alsasound.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,8 @@
+service daemon/alsasound {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/alsasound;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/alsasound;
+	exec_args stop = stop;
+}

Added: initng/daemon/ap-fcgi.i
==============================================================================
--- (empty file)
+++ initng/daemon/ap-fcgi.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/ap-fcgi {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/ap-fcgi;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/ap-fcgi;
+	exec_args stop = stop;
+}

Added: initng/daemon/apache.i
==============================================================================
--- (empty file)
+++ initng/daemon/apache.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,11 @@
+service daemon/apache {
+	need = system/initial system/localmount system/hostname system/rundir;
+#	need = net/lo;
+	use = daemon/sshd daemon/mysql daemon/postgres system/netmount;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/apache;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/apache;
+	exec_args stop = stop;
+}

Added: initng/daemon/autofs.i
==============================================================================
--- (empty file)
+++ initng/daemon/autofs.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+service daemon/autofs {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/autofs;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/autofs;
+	exec_args stop = stop;
+}

Added: initng/daemon/bnc.i
==============================================================================
--- (empty file)
+++ initng/daemon/bnc.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/bnc {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/bnc;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/bnc;
+	exec_args stop = stop;
+}

Added: initng/daemon/bopm.i
==============================================================================
--- (empty file)
+++ initng/daemon/bopm.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/bopm {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/bopm;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/bopm;
+	exec_args stop = stop;
+}

Added: initng/daemon/clamd.i
==============================================================================
--- (empty file)
+++ initng/daemon/clamd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/clamd {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/clamd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/clamd;
+	exec_args stop = stop;
+}

Added: initng/daemon/console.i
==============================================================================
--- (empty file)
+++ initng/daemon/console.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/console {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/console;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/console;
+	exec_args stop = stop;
+}

Added: initng/daemon/courier-authlib.i
==============================================================================
--- (empty file)
+++ initng/daemon/courier-authlib.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/courier-authlib {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/courier-authlib;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/courier-authlib;
+	exec_args stop = stop;
+}

Added: initng/daemon/courier-imap-ssl.i
==============================================================================
--- (empty file)
+++ initng/daemon/courier-imap-ssl.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/courier-imap-ssl {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/courier-imap-ssl;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/courier-imap-ssl;
+	exec_args stop = stop;
+}

Added: initng/daemon/courier-imap.i
==============================================================================
--- (empty file)
+++ initng/daemon/courier-imap.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/courier-imap {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/courier-imap;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/courier-imap;
+	exec_args stop = stop;
+}

Added: initng/daemon/cpusets.i
==============================================================================
--- (empty file)
+++ initng/daemon/cpusets.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/cpusets {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/cpusets;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/cpusets;
+	exec_args stop = stop;
+}

Added: initng/daemon/crond.i
==============================================================================
--- (empty file)
+++ initng/daemon/crond.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,8 @@
+service daemon/crond {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/crond;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/crond;
+	exec_args stop = stop;
+}

Added: initng/daemon/cupsd.i
==============================================================================
--- (empty file)
+++ initng/daemon/cupsd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,7 @@
+daemon daemon/cupsd {
+	need = system/initial system/checkroot;
+	require_network;
+
+	exec daemon = /usr/sbin/cupsd;
+	exec_args daemon = -f -c /etc/cups/cupsd.conf;
+}

Added: initng/daemon/dhcpd.i
==============================================================================
--- (empty file)
+++ initng/daemon/dhcpd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+service daemon/dhcpd {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/dhcpd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/dhcpd;
+	exec_args stop = stop;
+}

Added: initng/daemon/dpcproxy.i
==============================================================================
--- (empty file)
+++ initng/daemon/dpcproxy.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,11 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/dpcproxy {
+	need = system/initial system/mountfs system/rundir;
+#	need = net/lo;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/dpcproxy;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/dpcproxy;
+	exec_args stop = stop;
+}

Added: initng/daemon/dspam.i
==============================================================================
--- (empty file)
+++ initng/daemon/dspam.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/dspam {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/dspam;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/dspam;
+	exec_args stop = stop;
+}

Added: initng/daemon/eventum-irc.i
==============================================================================
--- (empty file)
+++ initng/daemon/eventum-irc.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/eventum-irc {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/eventum-irc;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/eventum-irc;
+	exec_args stop = stop;
+}

Added: initng/daemon/famd.i
==============================================================================
--- (empty file)
+++ initng/daemon/famd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Thu Dec  1 15:15:07 EET 2005
+service daemon/famd {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/famd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/famd;
+	exec_args stop = stop;
+}

Added: initng/daemon/freevo.i
==============================================================================
--- (empty file)
+++ initng/daemon/freevo.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 22:34:13 EET 2005
+service daemon/freevo {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/freevo;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/freevo;
+	exec_args stop = stop;
+}

Added: initng/daemon/freevo_dep.i
==============================================================================
--- (empty file)
+++ initng/daemon/freevo_dep.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 22:34:13 EET 2005
+service daemon/freevo_dep {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/freevo_dep;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/freevo_dep;
+	exec_args stop = stop;
+}

Added: initng/daemon/freevo_recordserver.i
==============================================================================
--- (empty file)
+++ initng/daemon/freevo_recordserver.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 22:34:13 EET 2005
+service daemon/freevo_recordserver {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/freevo_recordserver;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/freevo_recordserver;
+	exec_args stop = stop;
+}

Added: initng/daemon/freevo_webserver.i
==============================================================================
--- (empty file)
+++ initng/daemon/freevo_webserver.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 22:34:13 EET 2005
+service daemon/freevo_webserver {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/freevo_webserver;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/freevo_webserver;
+	exec_args stop = stop;
+}

Added: initng/daemon/gpm.i
==============================================================================
--- (empty file)
+++ initng/daemon/gpm.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,6 @@
+daemon daemon/gpm {
+	need = system/sysinit system/rundir;
+	exec daemon = /usr/sbin/gpm;
+	exec_args daemon = -m /dev/input/mice -t imps2;
+	pid_file = /var/run/gpm.pid;
+}

Added: initng/daemon/hotplug.i
==============================================================================
--- (empty file)
+++ initng/daemon/hotplug.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/hotplug {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/hotplug;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/hotplug;
+	exec_args stop = stop;
+}

Added: initng/daemon/httpd.i
==============================================================================
--- (empty file)
+++ initng/daemon/httpd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/httpd {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/httpd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/httpd;
+	exec_args stop = stop;
+}

Added: initng/daemon/imapproxy.i
==============================================================================
--- (empty file)
+++ initng/daemon/imapproxy.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/imapproxy {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/imapproxy;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/imapproxy;
+	exec_args stop = stop;
+}

Added: initng/daemon/ip6tables.i
==============================================================================
--- (empty file)
+++ initng/daemon/ip6tables.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/ip6tables {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/ip6tables;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/ip6tables;
+	exec_args stop = stop;
+}

Added: initng/daemon/iptables.i
==============================================================================
--- (empty file)
+++ initng/daemon/iptables.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,8 @@
+service daemon/iptables {
+	need = system/initial system/mountfs;
+
+	exec start = /etc/rc.d/init.d/iptables;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/iptables;
+	exec_args stop = stop;
+}

Added: initng/daemon/jserv.i
==============================================================================
--- (empty file)
+++ initng/daemon/jserv.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/jserv {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/jserv;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/jserv;
+	exec_args stop = stop;
+}

Added: initng/daemon/kdm.i
==============================================================================
--- (empty file)
+++ initng/daemon/kdm.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/kdm {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/kdm;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/kdm;
+	exec_args stop = stop;
+}

Added: initng/daemon/klogd.i
==============================================================================
--- (empty file)
+++ initng/daemon/klogd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,12 @@
+# klogd		Starts klogd.
+#
+# description:	Klogd catches kernel messages and sends it to syslog daemon. \
+#		It is a good idea to always run klogd.
+
+daemon daemon/klogd {
+#	need = system/initial system/mountroot
+	need = system/sysinit daemon/syslog;
+
+	exec daemon = /sbin/klogd;
+	exec_args daemon = -c 1;
+}

Added: initng/daemon/lighttpd.i
==============================================================================
--- (empty file)
+++ initng/daemon/lighttpd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,8 @@
+daemon daemon/lighttpd {
+	need = system/localmount system/modules system/hostname;
+	use = system/static-modules system/coldplug;
+	require_network;
+
+	exec daemon = /usr/sbin/lighttpd;
+	exec_args daemon = -D -f /etc/lighttpd/lighttpd.conf;
+}

Added: initng/daemon/lisa.i
==============================================================================
--- (empty file)
+++ initng/daemon/lisa.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 22:34:12 EET 2005
+service daemon/lisa {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/lisa;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/lisa;
+	exec_args stop = stop;
+}

Added: initng/daemon/mdns.i
==============================================================================
--- (empty file)
+++ initng/daemon/mdns.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/mdns {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/mdns;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/mdns;
+	exec_args stop = stop;
+}

Added: initng/daemon/messagebus.i
==============================================================================
--- (empty file)
+++ initng/daemon/messagebus.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/messagebus {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/messagebus;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/messagebus;
+	exec_args stop = stop;
+}

Added: initng/daemon/mldonkey.i
==============================================================================
--- (empty file)
+++ initng/daemon/mldonkey.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+service daemon/mldonkey {
+	need = system/initial system/mountfs system/rundir;
+	use = system/mymount;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/mldonkey;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/mldonkey;
+	exec_args stop = stop;
+}

Added: initng/daemon/monit.i
==============================================================================
--- (empty file)
+++ initng/daemon/monit.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Thu Dec  1 15:15:06 EET 2005
+service daemon/monit {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/monit;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/monit;
+	exec_args stop = stop;
+}

Added: initng/daemon/mysql.i
==============================================================================
--- (empty file)
+++ initng/daemon/mysql.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+service daemon/mysql {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/mysql start;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/mysql;
+	exec_args stop = stop;
+}

Added: initng/daemon/mythbackend.i
==============================================================================
--- (empty file)
+++ initng/daemon/mythbackend.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+service daemon/mythbackend {
+	need = system/initial system/mountfs system/rundir daemon/mysql;
+	use = system/mymount;
+
+	exec start = /etc/rc.d/init.d/mythbackend;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/mythbackend;
+	exec_args stop = stop;
+}

Added: initng/daemon/nagios.i
==============================================================================
--- (empty file)
+++ initng/daemon/nagios.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Thu Dec  1 15:15:04 EET 2005
+service daemon/nagios {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/nagios;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/nagios;
+	exec_args stop = stop;
+}

Added: initng/daemon/named.i
==============================================================================
--- (empty file)
+++ initng/daemon/named.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/named {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/named;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/named;
+	exec_args stop = stop;
+}

Added: initng/daemon/nessusd.i
==============================================================================
--- (empty file)
+++ initng/daemon/nessusd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/nessusd {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/nessusd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/nessusd;
+	exec_args stop = stop;
+}

Added: initng/daemon/network.i
==============================================================================
--- (empty file)
+++ initng/daemon/network.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+service daemon/network {
+	need = system/sysinit system/mountroot system/rundir;
+	network_provider;
+
+	exec start = /etc/rc.d/init.d/network;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/network;
+	exec_args stop = stop;
+}

Added: initng/daemon/nfsfs.i
==============================================================================
--- (empty file)
+++ initng/daemon/nfsfs.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/nfsfs {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/nfsfs;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/nfsfs;
+	exec_args stop = stop;
+}

Added: initng/daemon/nrpe.i
==============================================================================
--- (empty file)
+++ initng/daemon/nrpe.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Mon Nov  7 13:28:48 EET 2005
+service daemon/nrpe {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/nrpe;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/nrpe;
+	exec_args stop = stop;
+}

Added: initng/daemon/ntpd.i
==============================================================================
--- (empty file)
+++ initng/daemon/ntpd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+service daemon/ntpd {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/ntpd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/ntpd;
+	exec_args stop = stop;
+}

Added: initng/daemon/openvpn.i
==============================================================================
--- (empty file)
+++ initng/daemon/openvpn.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,56 @@
+daemon daemon/openvpn/* {
+	need = system/initial system/checkroot system/rundir;
+# need resolv.conf
+	exec daemon = /usr/sbin/openvpn;
+	exec_args daemon = --config /etc/openvpn/$NAME.conf --writepid /var/run/openvpn/$NAME.pid --cd /etc/openvpn;
+	pid_file = /var/run/openvpn/$NAME.pid;
+}
+
+service daemon/openvpn {
+	need = system/initial system/checkroot;
+	require_network;
+	
+	script start = {
+		echo "Trying to load tun module if any ..."
+		modprobe tun > /dev/null 2>&1
+		if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+			echo "Detected broken /dev/net/tun symlink, fixing..."
+			rm -f /dev/net/tun
+			ln -s /dev/misc/net/tun /dev/net/tun
+		fi
+
+		[ -f /etc/sysconfig/openvpn ] && . /etc/sysconfig/openvpn
+		if [ -z "$TUNNELS" ]; then
+			echo "No tunnels configured in /etc/sysconfig/openvpn"
+			exit 6
+		fi
+
+		for VPN in $TUNNELS; do
+			if [ -e /etc/openvpn/$VPN.conf ]; then
+				echo "Starting openvpn for $VPN"
+				/sbin/ngc -u daemon/openvpn/$VPN > /dev/null
+			else
+				echo "Config missing: /etc/openvpn/$VPN.conf."
+			fi
+		done
+		exit 0
+	}
+
+	script stop = {
+		[ -f /etc/sysconfig/openvpn ] && . /etc/sysconfig/openvpn
+		if [ -z "$TUNNELS" ]; then
+			echo "No tunnels configured in /etc/sysconfig/openvpn"
+			exit 6
+		fi
+
+		for VPN in $TUNNELS; do
+			if [ -e /etc/openvpn/$VPN.conf ]; then
+				echo "Stopping openvpn for $VPN"
+				/sbin/ngc -d daemon/openvpn/$VPN > /dev/null
+			else
+				echo "Config missing: /etc/openvpn/$VPN.conf."
+			fi
+		done
+		exit 0
+	}
+}

Added: initng/daemon/polipo.i
==============================================================================
--- (empty file)
+++ initng/daemon/polipo.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:47 EET 2005
+service daemon/polipo {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/polipo;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/polipo;
+	exec_args stop = stop;
+}

Added: initng/daemon/portmap.i
==============================================================================
--- (empty file)
+++ initng/daemon/portmap.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/portmap {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/portmap;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/portmap;
+	exec_args stop = stop;
+}

Added: initng/daemon/postfix.i
==============================================================================
--- (empty file)
+++ initng/daemon/postfix.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/postfix {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/postfix;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/postfix;
+	exec_args stop = stop;
+}

Added: initng/daemon/pound.i
==============================================================================
--- (empty file)
+++ initng/daemon/pound.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/pound {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/pound;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/pound;
+	exec_args stop = stop;
+}

Added: initng/daemon/preload.i
==============================================================================
--- (empty file)
+++ initng/daemon/preload.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,8 @@
+service daemon/preload {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/preload;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/preload;
+	exec_args stop = stop;
+}

Added: initng/daemon/pure-ftpd.i
==============================================================================
--- (empty file)
+++ initng/daemon/pure-ftpd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/pure-ftpd {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/pure-ftpd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/pure-ftpd;
+	exec_args stop = stop;
+}

Added: initng/daemon/rc-inetd.i
==============================================================================
--- (empty file)
+++ initng/daemon/rc-inetd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/rc-inetd {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/rc-inetd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/rc-inetd;
+	exec_args stop = stop;
+}

Added: initng/daemon/rdate.i
==============================================================================
--- (empty file)
+++ initng/daemon/rdate.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/rdate {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/rdate;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/rdate;
+	exec_args stop = stop;
+}

Added: initng/daemon/samba.i
==============================================================================
--- (empty file)
+++ initng/daemon/samba.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,20 @@
+# handles init.d/smb -- do not remove this line
+daemon daemon/samba/smbd {
+	need = system/initial system/mountfs system/hostname system/rundir;
+	require_network;
+	use = daemon/cupsd;
+	exec daemon = /usr/sbin/smbd;
+	exec_args daemon = -F;
+}
+
+daemon daemon/samba/nmbd {
+	need = system/initial system/mountfs system/hostname system/rundir;
+	require_network;
+	exec daemon = /usr/sbin/nmbd;
+	exec_args daemon = -F;
+}
+
+virtual daemon/samba {
+	need = daemon/samba/smbd daemon/samba/nmbd system/rundir;
+	also_stop = daemon/samba/smbd daemon/samba/nmbd;
+}

Added: initng/daemon/saslauthd.i
==============================================================================
--- (empty file)
+++ initng/daemon/saslauthd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/saslauthd {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/saslauthd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/saslauthd;
+	exec_args stop = stop;
+}

Added: initng/daemon/serial.i
==============================================================================
--- (empty file)
+++ initng/daemon/serial.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,6 @@
+daemon daemon/serial {
+	need = system/mountroot;
+	exec daemon = /sbin/agetty;
+	exec_args daemon = ttyS0 115200;
+	respawn;
+}

Added: initng/daemon/slapd.i
==============================================================================
--- (empty file)
+++ initng/daemon/slapd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/slapd {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/ldap;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/ldap;
+	exec_args stop = stop;
+}

Added: initng/daemon/snmpd.i
==============================================================================
--- (empty file)
+++ initng/daemon/snmpd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/snmpd {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/snmpd;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/snmpd;
+	exec_args stop = stop;
+}

Added: initng/daemon/spamd.i
==============================================================================
--- (empty file)
+++ initng/daemon/spamd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,11 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/spamd {
+	need = system/initial system/mountfs system/rundir;
+#	need = net/lo;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/spamassassin;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/spamassassin;
+	exec_args stop = stop;
+}

Added: initng/daemon/squid.i
==============================================================================
--- (empty file)
+++ initng/daemon/squid.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,68 @@
+service daemon/squid {
+	need = system/initial system/hostname system/rundir;
+	require_network;
+	nice = +5;
+
+	script start = {
+		# Sanity check
+		[ -f /etc/squid/squid.conf ] || exit 0
+
+		# Source function library
+		. /etc/rc.d/init.d/functions
+
+		# Get service config
+		[ -f /etc/sysconfig/squid ] && . /etc/sysconfig/squid
+
+		msg_starting Squid
+		ulimit -n 8192
+		daemon squid $SQUID_OPTS
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/squid
+
+		exit $RETVAL
+	}
+
+	script stop = {
+		# Sanity check
+		[ -f /etc/squid/squid.conf ] || exit 0
+
+		# Source function library
+		. /etc/rc.d/init.d/functions
+
+		# Get service config
+		[ -f /etc/sysconfig/squid ] && . /etc/sysconfig/squid
+
+		# Set default shutdown timeout if it is not set in service config
+		SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-60}
+
+		msg_stopping Squid
+
+		if [ -f /var/run/squid.pid ]; then
+			PID=$(filter_chroot `cat /var/run/squid.pid`)
+			if [ -z "$PID" ]; then
+				PID=0
+			fi
+		else
+			PID=0
+		fi
+		killproc squid
+		RETVAL=$?
+		if [ ! $PID -eq 0 ]; then
+			show "Waiting for Squid to stop"
+			busy
+			timeout=0
+			while ps -U squid -o user | grep -q ^squid
+			do
+				if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
+					break
+				fi
+				sleep 1
+				timeout=$((timeout+1))
+			done
+			ok
+		fi
+		rm -f /var/lock/subsys/squid >/dev/null 2>&1
+
+		exit $RETVAL
+	}
+}

Added: initng/daemon/sshd.i
==============================================================================
--- (empty file)
+++ initng/daemon/sshd.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,7 @@
+daemon daemon/sshd {
+	need = system/initial system/mountfs system/hostname system/rundir;
+	exec daemon = /usr/sbin/sshd;
+	exec_args daemon = -D;
+	require_network;
+	respawn;
+}

Added: initng/daemon/svscan.i
==============================================================================
--- (empty file)
+++ initng/daemon/svscan.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,7 @@
+daemon daemon/svscan {
+	need = system/sysinit;
+	require_network;
+
+	exec daemon = /usr/sbin/svscan;
+	exec_args daemon = /service;
+}

Added: initng/daemon/syslog-ng.i
==============================================================================
--- (empty file)
+++ initng/daemon/syslog-ng.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,6 @@
+daemon daemon/syslog-ng {
+	need = system/initial system/clock system/hostname system/mountfs;
+	#provide = logger
+	exec daemon = /usr/sbin/syslog-ng;
+	exec_args daemon = -F -p /var/run/syslog-ng.pid;
+}

Added: initng/daemon/syslog.i
==============================================================================
--- (empty file)
+++ initng/daemon/syslog.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,14 @@
+# syslog	Starts syslogd
+#
+# description: Syslog is the facility by which many daemons use to log \
+# messages to various system log files.  It is a good idea to always \
+# run syslog.
+
+daemon daemon/syslog {
+#	need = system/initial system/mountroot
+# TODO system/mountvar
+	need = system/sysinit system/mountroot system/hostname system/rundir;
+
+	exec daemon = /sbin/syslogd;
+	exec_args daemon = -m 0;
+}

Added: initng/daemon/sysstat.i
==============================================================================
--- (empty file)
+++ initng/daemon/sysstat.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/sysstat {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/sysstat;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/sysstat;
+	exec_args stop = stop;
+}

Added: initng/daemon/tenshi.i
==============================================================================
--- (empty file)
+++ initng/daemon/tenshi.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/tenshi {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/tenshi;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/tenshi;
+	exec_args stop = stop;
+}

Added: initng/daemon/timezone.i
==============================================================================
--- (empty file)
+++ initng/daemon/timezone.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/timezone {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/timezone;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/timezone;
+	exec_args stop = stop;
+}

Added: initng/daemon/tuxaator.i
==============================================================================
--- (empty file)
+++ initng/daemon/tuxaator.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/tuxaator {
+	need = system/initial system/mountfs system/rundir;
+	require_network;
+
+	exec start = /etc/rc.d/init.d/tuxaator;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/tuxaator;
+	exec_args stop = stop;
+}

Added: initng/daemon/uml.i
==============================================================================
--- (empty file)
+++ initng/daemon/uml.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:46 EET 2005
+service daemon/uml {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/uml;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/uml;
+	exec_args stop = stop;
+}

Added: initng/daemon/vprocunhide.i
==============================================================================
--- (empty file)
+++ initng/daemon/vprocunhide.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:44 EET 2005
+service daemon/vprocunhide {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/vprocunhide;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/vprocunhide;
+	exec_args stop = stop;
+}

Added: initng/daemon/vservers.i
==============================================================================
--- (empty file)
+++ initng/daemon/vservers.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Tue Nov 22 18:36:12 EET 2005
+service daemon/vservers {
+	need = system/initial system/mountfs system/rundir;
+	need = daemon/vprocunhide;
+
+	exec start = /etc/rc.d/init.d/vservers;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/vservers;
+	exec_args stop = stop;
+}

Added: initng/daemon/xend.i
==============================================================================
--- (empty file)
+++ initng/daemon/xend.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/xend {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/xend;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/xend;
+	exec_args stop = stop;
+}

Added: initng/daemon/xendomains.i
==============================================================================
--- (empty file)
+++ initng/daemon/xendomains.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 19:50:45 EET 2005
+service daemon/xendomains {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/xendomains;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/xendomains;
+	exec_args stop = stop;
+}

Added: initng/daemon/xfs.i
==============================================================================
--- (empty file)
+++ initng/daemon/xfs.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,24 @@
+# xfs:		Starts the X Font Server
+#
+# description:	Starts and stops the X Font Server at boot time and shutdown.
+
+service daemon/prexfs {
+#	need = system/initial system/mountfs system/bootmisc
+	need = system/initial system/mountfs system/cleanfs system/rundir;
+
+	script start = {
+		FONT_UNIX_DIR=/tmp/.font-unix
+		rm -rf $FONT_UNIX_DIR
+		mkdir $FONT_UNIX_DIR
+		chown root:root $FONT_UNIX_DIR
+		chmod 1777 $FONT_UNIX_DIR
+	}
+}
+
+daemon daemon/xfs {
+	need = system/initial system/mountfs daemon/prexfs;
+
+	exec daemon = /usr/X11R6/bin/xfs;
+	exec_args daemon = -port 7100 -daemon -droppriv;
+	pid_file = /var/run/xfs.pid;
+}

Added: initng/daemon/yum.i
==============================================================================
--- (empty file)
+++ initng/daemon/yum.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# Autogenerated by ./migrate_rc.d-initng.i.sh on Fri Nov  4 22:34:13 EET 2005
+service daemon/yum {
+	need = system/initial system/mountfs system/rundir;
+
+	exec start = /etc/rc.d/init.d/yum;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/yum;
+	exec_args stop = stop;
+}

Added: initng/default.runlevel
==============================================================================
--- (empty file)
+++ initng/default.runlevel	Wed Dec  7 23:40:36 2005
@@ -0,0 +1 @@
+system

Added: initng/migrate_rc.d-initng.i.sh
==============================================================================
--- (empty file)
+++ initng/migrate_rc.d-initng.i.sh	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,71 @@
+#!/bin/sh
+# create dummy .i from each service present in /etc/rc.d/init.d
+
+blacklisted() {
+	case "$s" in
+	killall | allowlogin | sys-chroots | random | single | \
+	cups | qmail )
+		return 0
+		;;
+	esac
+	return 1
+}
+
+add() {
+	local s=$1
+	local pkg=$2
+	local svc=$3
+
+	if [ -f $svc.i ]; then
+		echo >&2 "Abourt: $svc already exists!"
+		exit 1
+	fi
+
+	network=$(grep /etc/sysconfig/network -c /etc/rc.d/init.d/$s)
+	[ $network = 0 ] && network=
+
+	echo "%_initng_service_hook -p $pkg $svc" >> deps.spec
+	cat > $svc.i <<EOF
+# Autogenerated by $0 on $(LC_ALL=C date)
+service $svc {
+	need = system/initial system/mountfs system/rundir;
+	${network:+require_network;}
+
+	exec start = /etc/rc.d/init.d/$s;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/$s;
+	exec_args stop = stop;
+}
+EOF
+}
+
+for f in $(find /etc/rc.d/init.d -type f -perm +100); do
+	pkg=$(rpm --qf '%{name}\n' -qf $f 2>/dev/null | grep -v 'is not')
+	[ "$pkg" ] || continue
+	s=$(basename "$f")
+
+	blacklisted && continue
+
+	# skip direct match
+	[ -f daemon/$s.i -o -f net/$s.i ] && continue
+
+	svc="daemon/$s"
+
+	# skip ones that are calling directly init.d script
+	have=$(grep init.d/$s {net,daemon}/*.i | wc -l)
+	[ $have -gt 0 ] && continue
+
+	# skip with processname
+	procnames=$(awk '/^#.*processname:/{print $NF}' $f)
+	if [ "$procnames" ]; then
+		break=0
+		for p in $procnames; do
+			[ -f daemon/$p.i -o -f net/$p.i ] && break=1
+			svc="daemon/$p"
+		done
+		[ $break = 1 ] && continue
+	fi
+
+	echo "Adding $s ($pkg) as $svc"
+	add $s $pkg $svc
+done

Added: initng/net/net.i
==============================================================================
--- (empty file)
+++ initng/net/net.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,22 @@
+service net/* {
+	need = system/sysinit system/mountroot system/rundir;
+	network_provider;
+
+	script start = {
+		DEVICE=$NAME
+		echo "NET: Start: $DEVICE: ARGS: $#:$@"
+		/sbin/ifup $DEVICE
+        touch /var/lock/subsys/network
+	};
+	script stop = {
+		DEVICE=$NAME
+		echo "NET: Stop: $DEVICE: ARGS: $#:$@"
+		/sbin/ifdown $DEVICE
+
+		# remove lockfile if it was last interface
+		count=$(ngc -s | grep net/ | wc -l)
+		if [ "$count" = 0 ]; then
+				rm -f /var/lock/subsys/network
+		fi
+	};
+}

Added: initng/shutdown_script
==============================================================================
--- (empty file)
+++ initng/shutdown_script	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,26 @@
+#!/bin/sh
+case "$1" in
+halt|reboot|poweroff)
+	;;
+*)
+	echo "Have to use $0 [reboot|halt|poweroff]"
+	exit 1
+	;;
+esac
+
+# Set the path.
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+# move to root dir
+cd /
+
+. /etc/rc.d/init.d/functions
+
+run_cmd "Sending all processes the TERM signal" killall5 -15
+run_cmd "Sending all processes the KILL signal" killall5 -9
+
+[ -x /etc/rc.d/rc.acct ] && /etc/rc.d/rc.acct stop
+
+show "The system is halted"; ok
+
+exec /sbin/system_off "$1"

Added: initng/single.runlevel
==============================================================================
--- (empty file)
+++ initng/single.runlevel	Wed Dec  7 23:40:36 2005
@@ -0,0 +1 @@
+system

Added: initng/system.runlevel
==============================================================================
--- (empty file)
+++ initng/system.runlevel	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,17 @@
+#net/lo
+system/sysinit
+system/allowlogin
+system/timezone
+system/hostname
+system/consolefont
+daemon/agetty
+system/swap
+system/local
+system/checkroot
+system/mountroot
+system/mountfs
+system/modules
+system/localmount
+system/hdparm
+system/dmesg
+system/cleanfs

Added: initng/system/allowlogin.i
==============================================================================
--- (empty file)
+++ initng/system/allowlogin.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,8 @@
+service system/allowlogin {
+	need = system/sysinit;
+
+	exec start = /etc/rc.d/init.d/allowlogin;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/allowlogin;
+	exec_args stop = stop;
+}

Added: initng/system/checkroot.i
==============================================================================
--- (empty file)
+++ initng/system/checkroot.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,3 @@
+virtual system/checkroot {
+	need = system/mountroot;
+}

Added: initng/system/cleanfs.i
==============================================================================
--- (empty file)
+++ initng/system/cleanfs.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,66 @@
+service system/cleanfs {
+	need = system/mountfs;
+
+	script start = {
+		# Set the path
+		export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+		# Read functions
+		. /etc/rc.d/init.d/functions
+
+		# Read system config data
+		if [ -r /etc/sysconfig/system ]; then
+			. /etc/sysconfig/system
+		else
+			CLEAN_TMP=no
+		fi
+
+		# Clean up /.
+		rm -f /fastboot /fsckoptions /forcefsck /halt /poweroff
+
+		# Clean up /var
+		# I'd use find, but /usr may not be mounted.
+		for afile in /var/lock/* /var/run/*; do
+			bafile=$(basename $afile)
+			if [ -d "$afile" ]; then
+				[ "$bafile" != "news" -a "$bafile" != "sudo" -a "$bafile" != "mon" ] && rm -rf $afile/*
+			else
+				[ "$bafile" != "hwprofile" ] && rm -f $afile 2> /dev/null
+			fi
+		done
+		# Delete stale files
+		rm -f /var/lib/rpm/__db* /var/spool/postoffice/.pid.* /tmp/.X*-lock \
+			/tmp/.lock.* /tmp/.gdm_socket /tmp/.s.PGSQL.*
+		rm -rf /tmp/.X*-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/hsperfdata_* \
+			/tmp/kde-* /tmp/ksocket-* /tmp/mc-* /tmp/mcop-* /tmp/orbit-*  \
+			/tmp/scrollkeeper-*  /tmp/ssh-*
+
+		# Clean up utmp/wtmp
+		if ! is_no "$NEED_XFILES" ; then
+			:>/var/run/utmpx
+			touch /var/log/wtmpx
+			chown root.utmp /var/run/utmpx /var/log/wtmpx
+			chmod 0664 /var/run/utmpx /var/log/wtmpx
+		else
+			:>/var/run/utmp
+			touch /var/log/wtmp
+			chown root.utmp /var/run/utmp /var/log/wtmp
+			chmod 0664 /var/run/utmp /var/log/wtmp
+		fi
+
+		# Clean /tmp
+		if is_yes "$CLEAN_TMP"; then
+			rm -rf /tmp/* /tmp/.[a-zA-Z0-9]*
+		fi
+
+		# System protected dirs
+		mkdir -m 1777 -p /tmp/.ICE-unix > /dev/null 2>&1
+		chown root:root /tmp/.ICE-unix
+		[ -n "$SELINUX" ] && restorecon /tmp/.ICE-unix >/dev/null 2>&1
+
+		# There could be a new kernel version. Remove old psdevtab database
+		rm -f /etc/psdevtab
+	}
+}
+
+# vim:ai

Added: initng/system/clock.i
==============================================================================
--- (empty file)
+++ initng/system/clock.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,58 @@
+service system/clock {
+	need = system/initial system/timezone;
+
+script start = {
+	# Read functions
+	. /etc/rc.d/init.d/functions
+
+	# Set the system clock.
+	ARC=0
+	SRM=0
+	UTC=0
+
+	if [ -f /etc/sysconfig/clock ]; then
+		. /etc/sysconfig/clock
+
+		# convert old style clock config to new values
+		if [ "${CLOCKMODE}" = "GMT" ]; then
+			UTC=true
+		elif [ "${CLOCKMODE}" = "ARC" ]; then
+			ARC=true
+		fi
+	fi
+
+	if grep "system serial" /proc/cpuinfo | grep -q MILO ; then
+		ARC=true
+	fi
+
+	CLOCKDEF=""
+	CLOCKFLAGS="--hctosys"
+
+	if is_yes "$UTC" ; then
+		CLOCKFLAGS="$CLOCKFLAGS --utc"
+		CLOCKDEF="$CLOCKDEF (utc)"
+	else
+		CLOCKFLAGS="$CLOCKFLAGS --localtime"
+		CLOCKDEF="$CLOCKDEF (local)"
+	fi
+
+	if is_yes "$ARC" ; then
+		CLOCKFLAGS="$CLOCKFLAGS -A"
+		CLOCKDEF="$CLOCKDEF (arc)"
+	fi
+
+	if is_yes "$SRM" ; then
+		CLOCKFLAGS="$CLOCKFLAGS -S"
+		CLOCKDEF="$CLOCKDEF (srm)"
+	fi
+
+	# Check if timezone definition is available
+	if [ -e /etc/localtime ] ; then
+		if run_cmd "$(nls 'Setting clock')$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
+			show "$(nls 'Today`s date:') $(LC_CTYPE=C date)"; ok
+		fi
+	else
+		TIME_SETUP_DELAYED=yes
+	fi
+}
+}

Added: initng/system/coldplug.i
==============================================================================
--- (empty file)
+++ initng/system/coldplug.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,5 @@
+virtual system/coldplug {
+	# does nothing
+}
+
+# vim:ai

Added: initng/system/consolefont.i
==============================================================================
--- (empty file)
+++ initng/system/consolefont.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,116 @@
+service system/consolefont {
+#	need = system/initial system/keymaps
+	need = system/initial;
+# TODO split with system/keymaps
+# TODO split SAK elsewhere
+
+	script start = {
+		[ -f /etc/sysconfig/console ] || exit 0
+
+		[ -f /bin/loadkeys -o -f /usr/bin/loadkeys ] || exit 0
+		[ -f /bin/setfont -o -f /usr/bin/setfont ] || exit 0
+
+		[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
+
+		# Source function library
+		. /etc/rc.d/init.d/functions
+
+		. /etc/sysconfig/console
+
+		# Checking if we have framebuffer enabled
+		if [ -f /proc/fb ]; then
+			# /proc shows as files with size=0, this is workaround
+			if cat /proc/fb | grep -q "."; then FB=yes; fi
+		fi
+
+		if [ -n "$SVGATEXTMODE" ]; then
+			run_cmd "Setting Text Mode $SVGATEXTMODE" SVGATextMode $SVGATEXTMODE
+		fi
+
+		case "$LANG" in
+			*.utf8|*.UTF-8)
+			if [ -x /bin/unicode_start ] && /sbin/consoletype fg ; then
+			unicode_start $SYSFONT $SYSFONTACM
+			CONSOLEFONT=""
+			fi
+			;;
+		esac
+
+		if [ -n "$CONSOLEFONT" ]; then
+			CMD="setfont -m ${CONSOLEMAP:-trivial} $CONSOLEFONT"
+			show "Loading console font and map"
+			busy
+
+			# don't initialize on multiple terminals if we use fbset
+			# (assume that, in this case fb is loaded as a module)
+			if [ ! -z "$FB" ]; then
+				# Check for devfs (workaround: -a option don't work at all)
+				if [ -d /dev/vc ]; then
+					pattern="s/\/dev\/vc\///g"
+				else
+					pattern="s/\/dev\/tty//g"
+				fi
+
+				# save old tty number
+				tty=`/usr/bin/tty | sed $pattern`
+
+				# check if devfs (workaround: -a option don't work at all)
+				if [ -d /dev/vc ]; then
+					DEVICES="`ls /dev/vc/* | sed 's|/dev/vc/||g'`"
+				else
+					DEVICES="`cat /etc/inittab | grep '^[0-9]*:' | cut -f1 -d :`"
+				fi
+
+				[ -z "$SET_FONT_TERMINALS" ] && SET_FONT_TERMINALS="$DEVICES"
+
+				for cons in $SET_FONT_TERMINALS; do
+					/usr/bin/open -c $cons -s -w -- $CMD
+					if [ "$NUM_LOCK" ]; then
+						if [ $NUM_LOCK = "on" ]; then
+							/usr/bin/open -c $cons -s -w -- /usr/bin/setleds -D +num
+						else
+							/usr/bin/open -c $cons -s -w -- /usr/bin/setleds -D -num
+						fi
+					fi
+				done
+
+				if [ "$tty" = "/dev/console" ]; then
+						tty=1
+				fi
+				/usr/bin/switchto $tty
+			else
+					$CMD
+			fi
+			ok
+		fi
+		if [ -n "$KEYTABLE" ]; then
+			run_cmd "Loading keyboard table" loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0
+		fi
+		run_cmd "Enabling SAK sequence" /bin/sh -c "echo Control Alt keycode 101 = SAK | loadkeys"
+
+		power_option=""
+		if [ "$POWER_SAVE" ]; then
+			if [ "$BLANK_TIME" ]; then
+				power_option="-blank $BLANK_TIME";
+			fi
+			if [ "$POWERDOWN_TIME" ]; then
+				power_option="-powerdown $POWERDOWN_TIME $power_option";
+			fi
+			/usr/bin/setterm $power_option -powersave $POWER_SAVE
+		fi
+		if [ "$FOREGROUND_COLOUR" ]; then
+			/usr/bin/setterm -foreground $FOREGROUND_COLOUR
+		fi
+		if [ "$BACKGROUND_COLOUR" ]; then
+			/usr/bin/setterm -background $BACKGROUND_COLOUR
+		fi
+		if [ "$BEEP_LENGTH" ]; then
+			/usr/bin/setterm -blength $BEEP_LENGTH
+		fi
+	}
+
+	script stop = {
+		echo "Setting terminals to default values"
+		/usr/bin/setterm -default
+	}
+}

Added: initng/system/dmesg.i
==============================================================================
--- (empty file)
+++ initng/system/dmesg.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,25 @@
+service system/dmesg {
+	# needs actually writable /var
+	need = system/modules system/mountfs;
+
+	script start = {
+		# Set the path
+		export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+		# Now that we have all of our basic modules loaded and the kernel going,
+		# let's dump the syslog ring somewhere so we can find it later
+		dmesg -s 131072 > /var/log/dmesg
+		i=5
+		while [ $i -ge 0 ]; do
+				if [ -f /var/log/dmesg.$i ]; then
+					chmod 0600 /var/log/dmesg.$i
+					mv -f /var/log/dmesg.$i /var/log/dmesg.$(($i+1))
+				fi
+				i=$(($i-1))
+		done
+		cp -f /var/log/dmesg /var/log/dmesg.0
+		chmod 0600 /var/log/dmesg /var/log/dmesg.0
+	}
+}
+
+# vim:ai

Added: initng/system/hdparm.i
==============================================================================
--- (empty file)
+++ initng/system/hdparm.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,17 @@
+service system/hdparm {
+	# need modules, because it might first load ide driver
+	need = system/initial system/modules;
+
+	script start = {
+		# Set the path
+		export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+		# Setup hdparm thing (if exists and is needed)
+		if ! grep -iq nohdparm /proc/cmdline; then
+			[ -x /etc/rc.d/rc.hdparm ] && /etc/rc.d/rc.hdparm
+		fi
+
+	}
+}
+
+# vim:ai

Added: initng/system/hostname.i
==============================================================================
--- (empty file)
+++ initng/system/hostname.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,31 @@
+service system/hostname {
+	need = system/initial;
+
+	script start = {
+		# Read functions
+		. /etc/rc.d/init.d/functions
+
+		# And sysconfig
+		if [ -f /etc/sysconfig/system ]; then
+			. /etc/sysconfig/system
+		fi
+
+		# Read network config data
+		if [ -r /etc/sysconfig/network ]; then
+			. /etc/sysconfig/network
+		else
+			NETWORKING=no
+			HOSTNAME=localhost
+		fi
+
+		# Set the hostname
+		run_cmd "$(nls 'Host:') ${HOSTNAME}" hostname ${HOSTNAME}
+
+		# Set the NIS domain name
+		if [ -n "$NISDOMAIN" ]; then
+			run_cmd "$(nls 'NIS Domain:') ${NISDOMAIN}" domainname $NISDOMAIN
+		else
+			domainname ""
+		fi
+	}
+}

Added: initng/system/initial.i
==============================================================================
--- (empty file)
+++ initng/system/initial.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,63 @@
+service system/initial {
+	need = system/mountdev;
+
+	script start = {
+		# Read system config data
+		if [ -r /etc/sysconfig/system ]; then
+			. /etc/sysconfig/system
+		else
+			CONSOLE_LOGLEVEL=1
+			VSERVER=no
+		fi
+
+		if [ "$VSERVER" = "yes" ]; then
+			exit 0
+		fi
+
+		# Set the path
+		export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+		# PLD LiveCD support
+		if [ -x /etc/rc.d/rc.live ]; then
+			/etc/rc.d/rc.live
+		fi
+
+		# Read functions
+		. /etc/rc.d/init.d/functions
+
+		# Choose Hardware profile
+		if [ -f /etc/sysconfig/hwprof ]; then
+			. /etc/sysconfig/hwprof
+			if is_yes "${HWPROFILES}" && [ -x /sbin/hwprofile -a -d /etc/sysconfig/hwprofiles/data ]; then
+				mount -n / -o rw,remount
+				/sbin/hwprofile -qf
+				mount -n / -o ro,remount
+			fi
+		fi
+
+		if [ -x /sbin/start_udev ]; then
+			/sbin/start_udev
+		fi
+
+		# Configure Linux kernel (initial configuration, some required modules still
+		# may be missing).
+		/sbin/sysctl -e -p /etc/sysctl.conf > /dev/null 2>&1
+
+		# Set console loglevel
+		if [ -n "$CONSOLE_LOGLEVEL" ]; then
+			/bin/dmesg -n $CONSOLE_LOGLEVEL
+		fi
+
+		if [ -x /sbin/restorecon ] && LC_ALL=C fgrep -q " /dev " /proc/mounts ; then
+			/sbin/restorecon  -R /dev 2>/dev/null
+		fi
+
+		# FIXME: $CONSOLETYPE unset
+		if [ "$CONSOLETYPE" = "vt" -a -x /sbin/setsysfont ]; then
+			run_cmd "Setting default font" /sbin/setsysfont
+		fi
+
+	}
+}
+
+# vim:ai

Added: initng/system/local.i
==============================================================================
--- (empty file)
+++ initng/system/local.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# runs rc.local
+
+service system/local {
+	need = system/initial system/mountfs;
+	use = system/coldplug;
+	# net/eth0, this should/can need on network?
+	exec start = /etc/rc.d/rc.local;
+	last;
+}

Added: initng/system/localmount.i
==============================================================================
--- (empty file)
+++ initng/system/localmount.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,6 @@
+# compatability with initng service names
+# don't use in pld
+
+virtual system/localmount {
+	need = system/mountfs;
+}

Added: initng/system/modules.i
==============================================================================
--- (empty file)
+++ initng/system/modules.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,106 @@
+service system/modules {
+	need = system/initial system/mountroot;
+
+	script start = {
+		# Set the path
+		export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+		# Read functions
+		. /etc/rc.d/init.d/functions
+
+		# And sysconfig
+		if [ -r /etc/sysconfig/system ]; then
+			. /etc/sysconfig/system
+		else
+			VSERVER=no
+		fi
+
+		if [ "$VSERVER" = "yes" ]; then
+			exit 0
+		fi
+
+		# Should not fail if kernel do not have module
+		# support compiled in ...
+		if [ ! -f /proc/modules ]; then
+			USEMODULES=
+		elif ! grep -iq nomodules /proc/cmdline; then
+			USEMODULES=y
+		else
+			USEMODULES=
+		fi
+
+		# Run depmod if RUN_DEPMOD != "no" and:
+		# a) user requested or RUN_DEPMOD="";
+		# b) modules.dep is missing
+		# c) modules.dep is older than /etc/modules.conf or /lib/modules/`uname -r`
+		if ! is_no "$RUN_DEPMOD" && [ -n "$USEMODULES" ]; then
+				if is_yes "$RUN_DEPMOD" || [ -z "$RUN_DEPMOD" ]; then
+				run_cmd "Finding module dependencies" depmod -a
+			elif [ "$RUN_DEPMOD" = "ifmissing" ]; then
+				run_cmd "Finding module dependencies" depmod -A
+			fi
+		fi
+
+		if [ -f /proc/sys/kernel/modprobe ]; then
+			if [ -n "$USEMODULES" ]; then
+				sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
+				sysctl -w kernel.hotplug="/sbin/hotplug" >/dev/null 2>&1
+			else
+				# We used to set this to NULL, but that causes
+				# 'failed to exec' messages"
+				sysctl -w kernel.modprobe="/bin/true" >/dev/null 2>&1
+				sysctl -w kernel.hotplug="/bin/true" >/dev/null 2>&1
+			fi
+		fi
+
+		# Initialize USB controllers
+		usb=0
+		if ! grep -iq "nousb" /proc/cmdline 2>/dev/null && ! grep -q "usb" /proc/devices 2>/dev/null ; then
+			aliases=$(/sbin/modprobe -c | awk '/^alias usb-controller/ { print $3 }')
+			if [ -n "$aliases" -a "$aliases" != "off" ] ; then
+				/sbin/modprobe -k usbcore
+				for alias in $aliases ; do
+					[ "$alias" = "off" ] && continue
+					run_cmd "$(nls 'Initializing USB controller') ($alias)" /sbin/modprobe $alias
+				done
+				[ $? -eq 0 -a -n "$aliases" ] && usb=1
+			fi
+			if grep -iq "usb" /proc/devices 2>/dev/null ; then
+				usb=1
+			fi
+		fi
+
+		if [ "$usb" = "1" -a ! -f /proc/bus/usb/devices ]; then
+			run_cmd "Mounting USB filesystem" mount -t usbfs usbfs /proc/bus/usb
+		fi
+
+		needusbstorage=;
+		if [ "$usb" = "1" ]; then
+			needusbstorage=$(LC_ALL=C cat /proc/bus/usb/devices 2>/dev/null|grep -e "^I.*Cls=08");
+			if [ "$(kernelverser)" -lt "002006" ]; then
+				LC_ALL=C grep -q 'hid' /proc/bus/usb/drivers 2> /dev/null || run_cmd "Initializing USB HID interface" modprobe hid 2> /dev/null
+				mouseoutput=$(cat /proc/bus/usb/devices 2>/dev/null|grep -E "^I.*Cls=03.*Prot=02")
+				kbdoutput=$(cat /proc/bus/usb/devices 2>/dev/null|grep -E "^I.*Cls=03.*Prot=01")
+				if [ -n "$kbdoutput" ]; then
+					run_cmd "Initializing USB keyboard" modprobe keybdev
+				fi
+				if [ -n "$mouseoutput" ]; then
+					run_cmd "Initializing USB mouse" modprobe mousedev
+				fi
+			fi
+		fi
+
+
+		# Load usb storage here, to match most other things
+		if [ -n "$needusbstorage" ]; then
+				modprobe -k usb-storage >/dev/null 2>&1
+		fi
+
+		# Load modules
+		if [ -x /etc/rc.d/rc.modules ]; then
+			/etc/rc.d/rc.modules
+		fi
+
+		exit 0
+	}
+}

Added: initng/system/mountdev.i
==============================================================================
--- (empty file)
+++ initng/system/mountdev.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,27 @@
+# mounts virtual filesystems like /proc /sys and /selinux
+# this is probably called first thing in the boot
+
+service system/mountdev {
+	script start = {
+		# Set the path
+		export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+		echo "Mounting /proc"
+		# we need /proc mounted before everything
+		mount -n -o gid=17 -t proc /proc /proc
+
+		# sysfs is also needed before any other things (under kernel > 2.5)
+		if grep -q sysfs /proc/filesystems ; then
+			echo "Mounting /sys"
+			mount -n -o gid=17 -t sysfs sysfs /sys
+		fi
+
+		# selinux
+		if grep -q selinuxfs /proc/filesystems && ! grep -q selinuxfs /proc/mounts; then
+			echo "Mounting /selinux"
+			mount -n -o gid=17 -t selinuxfs selinuxfs /selinux
+		fi
+	}
+}
+
+# vim:ai

Added: initng/system/mountfs.i
==============================================================================
--- (empty file)
+++ initng/system/mountfs.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,27 @@
+# mounts all other filesystems rw
+
+service system/mountfs {
+	need = system/initial system/mountroot system/modules;
+
+	script start = {
+		# Read functions
+		. /etc/rc.d/init.d/functions
+
+		# And sysconfig
+		if [ -r /etc/sysconfig/system ]; then
+			. /etc/sysconfig/system
+		else
+			VSERVER=no
+		fi
+
+		if [ "$VSERVER" = "yes" ]; then
+			exit 0
+		fi
+
+		# Mount all other filesystems (except for NFS and /proc, which is already
+		# mounted). Contrary to standard usage,
+		# filesystems are NOT unmounted in single user mode.
+
+		run_cmd "Mounting local filesystems" mount -a -t nonfs,smbfs,ncpfs,proc,cifs -O no_netdev
+	}
+}

Added: initng/system/mountroot.i
==============================================================================
--- (empty file)
+++ initng/system/mountroot.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,166 @@
+# mounts rootfs rw
+
+service system/mountroot {
+	need = system/initial;
+
+	script start = {
+		# Read functions
+		. /etc/rc.d/init.d/functions
+
+		# And sysconfig
+		if [ -r /etc/sysconfig/system ]; then
+			. /etc/sysconfig/system
+		else
+			VSERVER=no
+		fi
+
+		if [ "$VSERVER" = "yes" ]; then
+			exit 0
+		fi
+
+		if [ -f /fastboot ] || grep -iq "fastboot" /proc/cmdline 2> /dev/null ; then
+			fastboot=yes
+		else
+			fastboot=
+		fi
+
+		if [ -f /fsckoptions ]; then
+			fsckoptions=$(cat /fsckoptions)
+		else
+			fsckoptions=''
+		fi
+
+		if [ -f /forcefsck ]; then
+				fsckoptions="-f $fsckoptions"
+		fi
+
+		_RUN_QUOTACHECK=0
+		_ROOTFS_TYPE=$(grep " / " /proc/mounts | awk '{ print $3 }')
+
+		if [ -z "$fastboot" -a "$_ROOTFS_TYPE" != "nfs" -a "$_ROOTFS_TYPE" != "romfs" ]; then 
+			show "Checking root filesystem"; started
+			initlog -c "fsck -C -T -a $fsckoptions /"
+
+			rc=$?
+
+			# A return of 4 or higher means there were serious problems.
+			if [ $rc -gt 3 ]; then
+				[ -e /proc/splash ] && echo "verbose" > /proc/splash
+				# don't use '\n' in nls macro !
+				echo
+				echo
+				nls "*** An error occurred during the file system check."
+				nls "*** Dropping you to a shell; the system will reboot"
+				nls "*** when you leave the shell."
+				echo
+
+				PS1="$(nls '(Repair filesystem)# ')"; export PS1
+				[ "$SELINUX" = "1" ] && disable_selinux
+				if is_yes "$RUN_SULOGIN_ON_ERR"; then
+					/sbin/sulogin
+				else
+					/bin/sh
+				fi
+
+				run_cmd "Unmounting file systems" umount -a
+				mount -n -o remount,ro /
+				run_cmd "Automatic reboot in progress" reboot
+			# A return of 2 or 3 means that filesystem was repaired but we need
+			# to reboot.
+			elif [ "$rc" = "2" -o "$rc" = "3" ]; then
+					[ -e /proc/splash ] && echo "verbose" > /proc/splash
+				echo
+				nls "*** Filesystem was repaired but system needs to be"
+				nls "*** rebooted before mounting it."
+				nls "*** REBOOTING ***"
+				echo
+
+				run_cmd "Unmounting file systems" umount -a
+				mount -n -o remount,ro /
+				run_cmd "Automatic reboot in progress" reboot
+			elif [ "$rc" = "1" ]; then
+				_RUN_QUOTACHECK=1
+			fi
+		fi
+
+		# Unmount the initrd, if necessary
+		if LC_ALL=C grep -q /initrd /proc/mounts && ! LC_ALL=C grep -q /initrd/loopfs /proc/mounts ; then
+			if [ -e /initrd/dev/.devfsd ]; then
+			umount /initrd/dev
+			fi
+			umount /initrd
+			/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
+		fi
+					  
+		# Check for arguments 
+		if grep -iq nopnp /proc/cmdline; then
+			PNP=
+		else
+			PNP=yes
+		fi
+
+		# set up pnp and kernel pnp
+		if [ -n "$PNP" ]; then
+			if is_yes "$RUN_USERPNP" && [ -x /sbin/isapnp -a -f /etc/isapnp/isapnp.conf ]; then
+			run_cmd "Setting up ISA PNP devices (userspace pnp)" /sbin/isapnp /etc/isapnp/isapnp.conf
+			fi
+			if is_yes "$RUN_KERNELPNP"; then
+			/sbin/modprobe -k isa-pnp 2> /dev/null
+			if [ -e /proc/isapnp -a -f /etc/isapnp/isapnp-kernel.conf ]; then
+				show "Setting up ISA PNP devices (kernelspace pnp)"; busy
+				grep -v "^#" /etc/isapnp/isapnp-kernel.conf > /proc/isapnp && (deltext; ok) || (deltext; fail)
+			fi
+			fi
+		fi
+
+		# Remount the root filesystem read-write
+		run_cmd "Remounting root filesystem in rw mode" mount -n -o remount,rw /
+
+		# Update quotas if fsck was run on /
+		if [ "$_RUN_QUOTACHECK" = "1" -a -x /sbin/quotacheck ]; then
+			run_cmd "Checking root filesystem quotas" /sbin/quotacheck -vnug /
+		fi
+
+		# Clean up SELinux labels
+		if [ -n "$SELINUX" ]; then
+			for file in /etc/mtab /etc/cryptomtab /etc/ld.so.cache ; do
+			[ -r $file ] && restorecon $file  >/dev/null 2>&1
+			done
+		fi
+				  
+		# Clear mtab
+		:>/etc/mtab
+		[ -f /etc/cryptomtab ] && :>/etc/cryptomtab
+
+		# Remove stale backups
+		rm -f /etc/mtab~ /etc/mtab~~ /etc/cryptomtab~ /etc/cryptomtab~~
+
+		# Enter root, /proc, /sys, devfs and other into mtab.
+		mount -f /
+		mount -f /proc
+		[ -f /proc/bus/usb/devices ] && mount -f -t usbfs usbfs /proc/bus/usb
+		[ -e /dev/.devfsd ] && mount -f -t devfs devfs /dev
+
+		if grep -q sysfs /proc/filesystems ; then
+			mount -f -t sysfs sysfs /sys
+		fi
+
+		if grep -q selinuxfs /proc/filesystems ; then
+				mount -f -t selinuxfs selinuxfs /selinux
+		fi
+
+# FIXME: should be elsewhere
+		# Remove /etc/nologin when starting system
+		[ -f /etc/nologin.boot ] && rm -f /etc/nologin /etc/nologin.boot
+
+		if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
+			show "Enabling Delay Login"; busy
+			echo > /etc/nologin
+			nls "System bootup in progress - please wait" >> /etc/nologin
+			echo >> /etc/nologin
+			chmod 644 /etc/nologin
+			cp -fp /etc/nologin /etc/nologin.boot
+			ok
+		fi
+	}
+}

Added: initng/system/mymount.i
==============================================================================
--- (empty file)
+++ initng/system/mymount.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,19 @@
+# my local service. not useful anywhere else
+
+service system/mymount {
+	need = system/modules;
+
+	script start = {
+		mount /home
+		mount /media
+		mount /media/movies
+		swapon /home/.swap
+	}
+
+	script stop = {
+		swapoff /home/.swap
+		umount /media/movies
+		umount /media
+		umount /home
+	}
+}

Added: initng/system/rundir.i
==============================================================================
--- (empty file)
+++ initng/system/rundir.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,7 @@
+# virtual that provides writable and cleaned up /var/run dir for pid and lock files
+# any init.d script should depend on this
+virtual system/rundir {
+	need = system/cleanfs;
+}
+
+# vim:ai

Added: initng/system/single.i
==============================================================================
--- (empty file)
+++ initng/system/single.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# FIXME does initng need this?
+
+service system/single {
+	need = system/sysinit;
+	exec start = /etc/rc.d/init.d/single;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/single;
+	exec_args stop = stop;
+}

Added: initng/system/static-modules.i
==============================================================================
--- (empty file)
+++ initng/system/static-modules.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,4 @@
+
+virtual system/static-modules {
+	need = system/modules;
+}

Added: initng/system/swap.i
==============================================================================
--- (empty file)
+++ initng/system/swap.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,9 @@
+# mounts swap
+# actually i remember rc.sysinit mounted swap more than once
+
+service system/swap {
+	# FIXME why we have mountroot?
+	need = system/initial system/mountroot;
+	exec start = /sbin/swapon;
+	exec_args start = -a;
+}

Added: initng/system/sysinit.i
==============================================================================
--- (empty file)
+++ initng/system/sysinit.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,4 @@
+# virtual for backward compatible
+virtual system/sysinit {
+	need = system/initial system/mountfs system/mountroot;
+}

Added: initng/system/timezone.i
==============================================================================
--- (empty file)
+++ initng/system/timezone.i	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,10 @@
+service system/timezone {
+	# NB this service does not write to /var so it doesn't depend on rundir
+	# but it needs writable /etc, and oh suprise /usr too! but it's not required
+	need = system/mountroot;
+
+	exec start = /etc/rc.d/init.d/timezone;
+	exec_args start = start;
+	exec stop = /etc/rc.d/init.d/timezone;
+	exec_args stop = stop;
+}

Added: initng/vserver.runlevel
==============================================================================
--- (empty file)
+++ initng/vserver.runlevel	Wed Dec  7 23:40:36 2005
@@ -0,0 +1,2 @@
+system/sysinit
+system/timezone



More information about the pld-cvs-commit mailing list