Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master imp-data-simpleinit by Arjan Bouter (6c0f25b6ccfdc042de7edc42b2aabe1980044b01)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Arjan Bouter <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master imp-data-simpleinit by Arjan Bouter (6c0f25b6ccfdc042de7edc42b2aabe1980044b01)
  • Date: Mon, 23 May 2011 11:58:28 -0500

GIT changes to master imp-data-simpleinit by Arjan Bouter
<abouter AT sourcemage.org>:

install.sh | 26 ++
modules/liblist | 14 +
modules/libundefined | 16 +
scripts/acpi-support/acpi-support | 53 ++++
scripts/acpi-support/vbesave | 64 +++++
scripts/acpid/acpid | 7
scripts/agt/smgl-agt | 21 +
scripts/alsa-lib/alsa | 101 ++++++++
scripts/alsa-lib/alsa.conf | 11
scripts/alsa-utils/alsa-state | 43 +++
scripts/amavisd-new/amavisd | 22 +
scripts/anubis/anubis | 7
scripts/apache-mod_ssl/apache | 54 ++++
scripts/apache/apache | 54 ++++
scripts/apache2/apache | 55 ++++
scripts/apache2/apache.conf | 4
scripts/apache22/apache | 53 ++++
scripts/apmd/apmd | 10
scripts/arpwatch/arpwatch | 8
scripts/asterisk/asterisk | 52 ++++
scripts/at/atd | 6
scripts/athcool/athcool | 22 +
scripts/autofs/autofs | 171 +++++++++++++
scripts/avahi/avahi-daemon | 23 +
scripts/bacula/bacula-dir | 8
scripts/bacula/bacula-fd | 8
scripts/bacula/bacula-sd | 8
scripts/bayonne2/bayonne | 38 +++
scripts/bfilter/bfilter | 7
scripts/bind/named | 30 ++
scripts/bluez-utils/bluetooth | 56 ++++
scripts/bluez/bluetooth | 46 +++
scripts/bnbt/bnbt | 19 +
scripts/boinc/boinc | 50 ++++
scripts/boinc/boinc.conf | 15 +
scripts/boxbackup/bbackupd | 7
scripts/boxbackup/bbstored | 6
scripts/canna/canna | 18 +
scripts/cdemu-daemon/cdemu-daemon | 38 +++
scripts/cdemu-daemon/cdemu-daemon.conf | 14 +
scripts/cherokee/cherokee | 25 ++
scripts/chpax/smgl-chpax | 21 +
scripts/chrony/chrony | 7
scripts/clamav/clamd | 14 +
scripts/clamav/freshclam | 6
scripts/coda-client/venus | 35 ++
scripts/coda-server/auth2 | 27 ++
scripts/coda-server/codasrv | 50 ++++
scripts/coda-server/update | 31 ++
scripts/console-tools/keymap.conf | 25 ++
scripts/console-tools/keymap.sh | 103 ++++++++
scripts/courier-authlib/courier-authlib | 54 ++++
scripts/courier-imap/courier-imap | 60 ++++
scripts/courier-imap/courier-imap-ssl | 61 ++++
scripts/courier-imap/courier-pop | 54 ++++
scripts/courier-imap/courier-pop-ssl | 56 ++++
scripts/courier/courier-imap | 61 ++++
scripts/courier/courier-imap-ssl | 59 ++++
scripts/courier/courier-mta | 91 +++++++
scripts/courier/courier-mta-ssl | 73 +++++
scripts/courier/courier-pop | 78 ++++++
scripts/courier/courier-pop-ssl | 65 +++++
scripts/cpqarrayd/cpqarray | 7
scripts/cpufreqd/cpufreqd | 58 ++++
scripts/cups-old/cups-old | 13 +
scripts/cups/cups | 13 +
scripts/cvsfs/smgl-cvsfsd | 20 +
scripts/cyrus-imapd/cyrus-imapd | 35 ++
scripts/cyrus-sasl/saslauthd | 20 +
scripts/cyrus-sasl/saslauthd.conf | 2
scripts/daemontools/svscan | 88 +++++++
scripts/dansguardian/dansguardian | 28 ++
scripts/dante/danted | 18 +
scripts/dbus/smgl-messagebus | 67 +++++
scripts/dcron/crond | 6
scripts/ddclient/ddclient | 8
scripts/denyhosts/denyhosts | 39 +++
scripts/denyhosts/denyhosts.conf | 14 +
scripts/dermixd/dermixd | 60 ++++
scripts/dermixd/dermixd.conf | 59 ++++
scripts/deskopt/deskopt | 12
scripts/devfsd/devfsd | 8
scripts/dhcdbd/dhcdbd | 61 ++++
scripts/dhcp/dhcp | 14 +
scripts/dhcp/dhcp.conf | 3
scripts/dictd/dictd | 7
scripts/distcc/distcc | 10
scripts/distcc/distcc.conf | 6
scripts/dnsmasq/dnsmasq | 7
scripts/dovecot/smgl-dovecot | 8
scripts/drac/drac | 26 ++
scripts/dropbear/dropbear | 8
scripts/dspam/dspam | 24 +
scripts/entrance/entrance | 8
scripts/esehttpd/esehttpd | 8
scripts/exalt-daemon/exaltd | 7
scripts/exim/exim | 12
scripts/exim/exim.conf | 10
scripts/fail2ban/fail2ban | 36 ++
scripts/fam/smgl-fam | 7
scripts/farmerjoe/farmerjoe-appserver | 40 +++
scripts/farmerjoe/farmerjoe-appserver.conf | 10
scripts/farmerjoe/farmerjoe-master | 40 +++
scripts/farmerjoe/farmerjoe-master.conf | 10
scripts/farmerjoe/farmerjoe-slave | 40 +++
scripts/farmerjoe/farmerjoe-slave.conf | 10
scripts/fcron/fcron | 7
scripts/ferm/ferm | 20 +
scripts/ferm/ferm.conf | 10
scripts/firebird/firebird2 | 41 +++
scripts/fnfx/fnfxd | 7
scripts/freeradius/radiusd | 7
scripts/freewnn/jserver | 17 +
scripts/fwknop/fwknopd | 24 +
scripts/g15daemon/g15daemon | 32 ++
scripts/gdm/gdm | 34 ++
scripts/gdm/gdm.sh | 27 ++
scripts/gdm2/gdm | 27 ++
scripts/git/git-daemon | 52 ++++
scripts/git/git-daemon.conf | 54 ++++
scripts/gkrellm2/gkrellmd | 10
scripts/gkrellm2/gkrellmd.conf | 13 +
scripts/gnump3d/gnump3d | 9
scripts/gnustep-base/gdomap | 7
scripts/gpm/gpm | 10
scripts/gpm/gpm.conf | 5
scripts/gpm/smgl-suspend-gpm | 19 +
scripts/hal/hald | 9
scripts/havp/havp | 20 +
scripts/hc-cron/crond | 6
scripts/hddtemp/hddtemp | 44 +++
scripts/hddtemp/hddtemp.conf | 3
scripts/hdparm/hdparm | 40 +++
scripts/hdparm/hdparm.conf | 23 +
scripts/hibernate-script/hibernate-cleanup | 90 +++++++
scripts/hotplug/hotplug | 101 ++++++++
scripts/httpd-dev/apache | 55 ++++
scripts/ifplugd/ifplugd | 66 +++++
scripts/ifupdown/mountnetwork | 43 +++
scripts/ifupdown/mountnetwork.conf | 4
scripts/ifupdown/network | 48 +++
scripts/ijb-waldhoff/junkbuster | 8
scripts/ijb/junkbuster | 8
scripts/init.d/devices | 110 ++++++++
scripts/init.d/devices.conf | 2
scripts/init.d/facilities.conf | 23 +
scripts/init.d/hostname.sh | 33 ++
scripts/init.d/init.conf | 30 ++
scripts/init.d/mountall.conf | 3
scripts/init.d/mountall.sh | 172 ++++++++++++++
scripts/init.d/mountroot.sh | 108 ++++++++
scripts/init.d/shutdown.conf | 2
scripts/init.d/single | 26 ++
scripts/init.d/smgl-default-crypt-fs | 9
scripts/init.d/smgl-default-remote-fs | 9
scripts/init.d/smgl-misc | 38 +++
scripts/init.d/smgl-suspend-single | 20 +
scripts/ipcad/ipcad | 8
scripts/iplog/iplog | 39 +++
scripts/iplog/iplog.sh | 39 +++
scripts/irda-utils/irda | 53 ++++
scripts/irqbalance/irqbalance | 6
scripts/ivman/ivman | 7
scripts/jabberd/jabberd | 65 +++++
scripts/kbd/keymap.conf | 25 ++
scripts/kbd/keymap.sh | 104 ++++++++
scripts/kdebase-workspace4/kdm4 | 8
scripts/kdebase/kdm | 7
scripts/keepalived/keepalived | 40 +++
scripts/krb5/krb5-admin-server | 7
scripts/krb5/krb5-kdc | 7
scripts/lamp/lamp | 29 ++
scripts/laptop-mode-tools/laptop-mode | 118 +++++++++
scripts/lcdproc/LCDd | 10
scripts/lcdproc/LCDd.conf | 2
scripts/libnetswitch/netswitch | 38 +++
scripts/libvirt/libvirtd | 10
scripts/lighttpd/lighttpd | 9
scripts/linux-initrd/bootsplash | 41 +++
scripts/linux-initrd/bootsplash.conf | 13 +
scripts/linux-wlan-ng/wlan | 79 ++++++
scripts/lisa/lisa | 20 +
scripts/lisa/lisa.conf | 9
scripts/lm_sensors/lm_sensors | 52 ++++
scripts/logitech_applet/logitech_applet | 16 +
scripts/logitech_applet/logitech_applet.conf | 7
scripts/loop-aes/loop-aes.conf | 7
scripts/loop-aes/losetup | 24 +
scripts/lsh/lshd | 8
scripts/lshwd/lshwd | 32 ++
scripts/mailman/mailman | 29 ++
scripts/maradns/maradns | 24 +
scripts/maradns/zoneserver | 24 +
scripts/mcron/cron | 7
scripts/mcron/mcron | 7
scripts/metalog/smgl-metalog | 9
scripts/mico/smgl-mico-nsd | 30 ++
scripts/mico/smgl-mico-nsd.conf | 1
scripts/microcode_ctl/microcode | 68 +++++
scripts/micron/micron | 7
scripts/middleman/middleman | 10
scripts/middleman/mman.conf | 2
scripts/module-init-tools/modutils | 42 +++
scripts/module-init-tools/modutils.conf | 8
scripts/modutils/modutils | 35 ++
scripts/mono/mono | 53 ++++
scripts/mpd/mpd | 11
scripts/mpd/mpd.conf | 245
++++++++++++++++++++
scripts/mysql/mysql | 183 ++++++++++++++
scripts/mythtv/mythtv.conf | 4
scripts/mythtv/smgl-mythbackend | 11
scripts/nagios/nagios | 19 +
scripts/nas/nasd | 18 +
scripts/nas/nasd.conf | 23 +
scripts/nessus-core/smgl-nessusd | 9
scripts/netatalk/netatalk | 7
scripts/netkit-bootparamd/bootparamd | 7
scripts/netkit-inetd/inetd | 7
scripts/newsd/newsd | 7
scripts/nfs-utils/nfs | 92 +++++++
scripts/nfs-utils/nfs.conf | 18 +
scripts/nfs-utils/nfslock | 45 +++
scripts/noip/smgl-noip | 17 +
scripts/nrpe/nrpe | 7
scripts/nsd/nsd | 8
scripts/ntop/ntop | 26 ++
scripts/ntop/ntop.conf | 10
scripts/ntp/ntp | 9
scripts/nufw/smgl-nufw | 40 +++
scripts/nut/upsd | 19 +
scripts/nut/upsdrvctl | 21 +
scripts/nut/upsmon | 19 +
scripts/oidentd/oidentd | 9
scripts/omniorb/omniorb-nameserver | 53 ++++
scripts/omniorb/omniorb-nameserver.conf | 17 +
scripts/openldap/slapd | 21 +
scripts/openldap/slapd.conf | 3
scripts/openmosix-tools/openmosix | 194 +++++++++++++++
scripts/openmosixview/mosstatd.sh | 11
scripts/openmosixview/openmosixcollector | 25 ++
scripts/openntpd/ntp | 17 +
scripts/openssh/sshd | 35 ++
scripts/openswan/ipsec | 20 +
scripts/openvpn/openvpn | 160 +++++++++++++
scripts/palantir/palantir | 53 ++++
scripts/pbbuttonsd/pbbuttonsd | 9
scripts/pcmcia-cs/pcmcia | 68 +++++
scripts/pcmcia-cs/pcmcia.conf | 15 +
scripts/pglogd/pglogd.sh | 22 +
scripts/pikt/piktsvc | 8
scripts/pks/pks | 19 +
scripts/plptools/plpfuse | 19 +
scripts/plptools/plpprintd | 12
scripts/plptools/psion | 11
scripts/plptools/psion.conf | 5
scripts/popfile/popfile | 48 +++
scripts/poptop/pptpd | 13 +
scripts/portmap/portmap | 7
scripts/portsentry/portsentry | 87 +++++++
scripts/postfix/postfix | 38 +++
scripts/postgresql/postgresql | 38 +++
scripts/postgresql/postgresql.conf | 11
scripts/powersave/powersaved | 21 +
scripts/privoxy/junkbuster | 10
scripts/prngd/prngd | 21 +
scripts/procps/smgl-sysctl | 22 +
scripts/proftpd/proftpd | 15 +
scripts/pure-ftpd/pure-ftpd | 10
scripts/pure-ftpd/pure-ftpd.conf | 4
scripts/qmail/qmail | 32 ++
scripts/queue/queue | 8
scripts/quota/quota | 35 ++
scripts/radvd/radvd | 37 +++
scripts/resin/resin | 33 ++
scripts/rng-tools/rngd | 6
scripts/rplay/rplay | 11
scripts/rsyslog/rsyslog | 16 +
scripts/rsyslog/rsyslog.conf | 6
scripts/rtirq/rtirq | 26 ++
scripts/samba/samba | 74 ++++++
scripts/scanlogd/scanlogd | 7
scripts/scim/scim | 27 ++
scripts/scmpc/scmpc | 15 +
scripts/sendmail/sendmail | 8
scripts/setserial/smgl-setserial | 34 ++
scripts/sfs/sfs-client | 7
scripts/sfs/sfs-server | 7
scripts/shorewall-common/shorewall | 47 +++
scripts/shorewall-common/shorewall.conf | 5
scripts/shorewall-lite/shorewall | 47 +++
scripts/shorewall-lite/shorewall.conf | 5
scripts/silc-server/smgl-silcd | 7
scripts/slim/slim | 9
scripts/smartmontools/smartd | 45 +++
scripts/snort/snort | 10
scripts/snort/snort.conf | 5
scripts/spamassassin/assassin | 8
scripts/spfs/spfs | 24 +
scripts/spfs/spfs.conf | 1
scripts/splashy/splashy | 10
scripts/splashy/splashy1 | 46 +++
scripts/splashy/splashy2 | 43 +++
scripts/splashy/splashy3 | 40 +++
scripts/splashy/splashy4 | 37 +++
scripts/splashy/splashy5 | 34 ++
scripts/squid/squid | 28 ++
scripts/synergy/smgl-synergy | 24 +
scripts/synergy/synergy.conf | 21 +
scripts/sysklogd/sysklogd | 33 ++
scripts/sysklogd/sysklogd.conf | 5
scripts/syslog-ng/syslog-ng | 8
scripts/system-tools-backends/system-tools-backends | 7
scripts/thttpd/thttpd | 39 +++
scripts/thttpd/thttpd.conf | 31 ++
scripts/udev-old/coldplug | 23 +
scripts/udev-old/udevd | 11
scripts/udev/coldplug | 28 ++
scripts/udev/copy-persistent-rules | 29 ++
scripts/udev/udevd | 9
scripts/ulogd/ulogd | 36 ++
scripts/uptimec/uptimec | 10
scripts/uptimec/uptimec.conf | 7
scripts/uptimed/smgl-uptimed-bootid | 28 ++
scripts/uptimed/uptimed | 13 +
scripts/util-linux/hwclock.conf | 2
scripts/util-linux/hwclock.sh | 41 +++
scripts/vixie-cron/crond | 6
scripts/vsftpd/vsftpd | 14 +
scripts/vtun/vtun | 40 +++
scripts/vtun/vtun.conf | 4
scripts/watchdog/watchdog | 34 ++
scripts/watchdog/watchdog.conf | 3
scripts/wdm/wdm | 19 +
scripts/webcleaner/webcleaner | 46 +++
scripts/webmin/webmin | 32 ++
scripts/wifi-radar/wifi-radar | 19 +
scripts/wine/wine | 52 ++++
scripts/wmacpimon/wmacpimond | 8
scripts/wondershaper/wshaper | 29 ++
scripts/wpa_supplicant/wpa_supplicant | 59 ++++
scripts/wpa_supplicant/wpa_supplicant.conf | 15 +
scripts/wwwoffle/wwwoffled | 92 +++++++
scripts/xdm/xdm | 7
scripts/xen-tools/xend | 56 ++++
scripts/xinetd/xinetd | 8
scripts/xshttpd/xshttpd | 33 ++
scripts/xshttpd/xshttpd.conf | 6
scripts/yaws/yaws | 84 ++++++
scripts/ypbind-mt/ypbind | 13 +
scripts/ypserv/yppasswdd | 7
scripts/ypserv/ypserv | 7
scripts/zaptel/zaptel | 80 ++++++
scripts/zope/zope | 33 ++
scripts/zope3/zope3 | 34 ++
simpleinit.def | 15 +
version | 1
356 files changed, 10322 insertions(+)

New commits:
commit 6c0f25b6ccfdc042de7edc42b2aabe1980044b01
Author: Arjan Bouter <abouter AT sourcemage.org>
Commit: Arjan Bouter <abouter AT sourcemage.org>

imp-data-simpleinit: initial import

diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..de72fdb
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+DATASET=simpleinit
+if [[ $2 ]] ; then
+ INSTALL_ROOT="$2"
+else
+ INSTALL_ROOT=""
+fi
+
+if [[ "$1" == "install" ]]; then
+ if ! grep -q "\./install.sh$" <<< "$0"; then
+ echo "This script must be ran from the IMP checkout dir!"
+ exit 1
+ fi
+ mkdir -vp $INSTALL_ROOT/lib/imp/{modules,scripts}/$DATASET
+ mkdir -vp $INSTALL_ROOT/lib/imp/def
+ cp -vr modules/* $INSTALL_ROOT/lib/imp/modules/$DATASET/
+ cp -vr scripts/* $INSTALL_ROOT/lib/imp/scripts/$DATASET/
+ cp -v $DATASET.def $INSTALL_ROOT/lib/imp/def/
+ sed -i -e
"s:SCRIPTROOT=.*:SCRIPTROOT=$INSTALL_ROOT/lib/imp/scripts/$DATASET:" \
+ -e
"s:MODULEROOT=.*:MODULEROOT=$INSTALL_ROOT/lib/imp/modules/$DATASET:"
$INSTALL_ROOT/lib/imp/def/$DATASET.def
+fi
+
+if [[ "$1" == "uninstall" ]]; then
+ rm -rv $INSTALL_ROOT/lib/imp/{modules,scripts}/$DATASET
+ rm -v $INSTALL_ROOT/lib/imp/def/$DATASET.def
+fi
diff --git a/modules/liblist b/modules/liblist
new file mode 100644
index 0000000..1634cf6
--- /dev/null
+++ b/modules/liblist
@@ -0,0 +1,14 @@
+simpleinit_list_installed(){
+ ls -l "$RUNLEVELROOT"/*/* | grep -v runlevel.config | sed -e
's!^.*/%\(.*\)/!\1 !'
+}
+
+simpleinit_list_spell(){
+ local spell=$1
+ if [[ -d $SCRIPTROOT/$spell ]]; then
+ cd $SCRIPTROOT/$spell
+ $LS --color=none | grep -v ".conf"
+ else
+ message "No scripts exists for this spell or spell does not exist"
+ fi
+
+}
diff --git a/modules/libundefined b/modules/libundefined
new file mode 100644
index 0000000..89d5989
--- /dev/null
+++ b/modules/libundefined
@@ -0,0 +1,16 @@
+function simpleinit_install_spell_script(){
+ message "Not yet implemented"
+}
+function simpleinit_install_all_spell_scripts(){
+ message "Not yet implemented"
+}
+function simpleinit_remove_script(){
+ message "Not yet implemented"
+}
+function simpleinit_activate_script(){
+ message "Not yet implemented"
+}
+function simpleinit_deactivate_script(){
+ message "Not yet implemented"
+}
+
diff --git a/scripts/acpi-support/acpi-support
b/scripts/acpi-support/acpi-support
new file mode 100755
index 0000000..dc0686c
--- /dev/null
+++ b/scripts/acpi-support/acpi-support
@@ -0,0 +1,53 @@
+#!/bin/sh
+# INIT script to check whether we're on batteries, and so start with laptop
+# mode etc enabled.
+
+### BEGIN INIT INFO
+# Provides: acpi-support
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start some power management scripts
+### END INIT INFO
+
+# Adding smgl stuff..
+PROGRAM=/etc/acpi/power.sh
+RUNLEVEL=3
+. /etc/init.d/smgl_init
+
+test -f /usr/share/acpi-support/power-funcs || exit 0
+
+# BUGS: unless we start *really* late, we have no way of throttling
+# xscreensaver, since it won't be there to command.
+. /usr/share/acpi-support/power-funcs
+
+test -d /var/lib/acpi-support || exit 0
+
+# Changing to support SMGL init way to do things...
+
+function start() {
+ echo "Checking battery state..."
+ if [ x"`echo /proc/acpi/ac_adapter/*`" != x"/proc/acpi/ac_adapter/*" ];
then
+ $PROGRAM
+ fi
+ # Source everything in /etc/acpi/start.d/
+ for SCRIPT in /etc/acpi/start.d/*.sh; do
+ if [ -f "$SCRIPT" ] ; then
+ . $SCRIPT
+ fi
+ done
+ echo "Done..."
+}
+
+function stop() {
+ echo "Disabling power management..."
+ if [ x"`echo /proc/acpi/ac_adapter/*`" != x"/proc/acpi/ac_adapter/*" ];
then
+ $PROGRAM stop
+ fi
+ echo "Done..."
+}
+
+function restart() {
+ echo "Unsupported..."
+}
diff --git a/scripts/acpi-support/vbesave b/scripts/acpi-support/vbesave
new file mode 100755
index 0000000..8da543f
--- /dev/null
+++ b/scripts/acpi-support/vbesave
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: vbesave
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Save VESA state at boot time
+# Description: VESA state is saved at boot time so that it can be
+# restored later to a sane state for example after a
suspend.
+### END INIT INFO
+
+# Adding SMGL stuff
+PROGRAM=/usr/sbin/vbetool
+RUNLEVEL=3
+. /etc/init.d/smgl_init
+
+test -f /usr/share/acpi-support/power-funcs || exit 0
+
+test -x /usr/sbin/vbetool || exit 0
+set -e
+
+test -f /etc/default/rcS && . /etc/default/rcS
+test -f /etc/default/acpi-support && . /etc/default/acpi-support
+test -f /usr/share/acpi-support/device-funcs && .
/usr/share/acpi-support/device-funcs
+
+# Changing to support SMGL init way to do things...
+
+function start() {
+ if laptop-detect > /dev/null; then
+ LAPTOP=true;
+ fi
+
+ if [ x$LAPTOP != xtrue ]; then
+ exit 0;
+ fi
+
+ DeviceConfig
+ echo "Saving VESA state..."
+ if [ "$SAVE_VBE_STATE" = "true" ]; then
+ if [ "$VERBOSE" = no ]; then
+ if ! $PROGRAM vbestate save > $VBESTATE 2>/dev/null; then
+ echo "$?"
+ fi
+ else
+ if ! $PROGRAM vbestate save > $VBESTATE ; then
+ echo "$?"
+ fi
+ fi
+ echo "VESA state saved..."
+ fi
+ echo "Done..."
+}
+
+function stop()
+{
+ echo "Unsupported..."
+}
+
+function restart()
+{
+ echo "Unsupported..."
+}
diff --git a/scripts/acpid/acpid b/scripts/acpid/acpid
new file mode 100644
index 0000000..2fb3e14
--- /dev/null
+++ b/scripts/acpid/acpid
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/acpid
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/agt/smgl-agt b/scripts/agt/smgl-agt
new file mode 100755
index 0000000..a1e9b6d
--- /dev/null
+++ b/scripts/agt/smgl-agt
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/agt
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Loading agt rules..."
+ $PROGRAM > /dev/null 2>&1
+ evaluate_retval
+}
+
+stop() {
+ echo "Flushing agt rules..."
+ $PROGRAM -f /dev/null > /dev/null 2>&1
+ evaluate_retval
+}
+
+reload() { return 1; }
diff --git a/scripts/alsa-lib/alsa b/scripts/alsa-lib/alsa
new file mode 100755
index 0000000..7d2770a
--- /dev/null
+++ b/scripts/alsa-lib/alsa
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+. /etc/sysconfig/alsa
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+# modprobe returns 255 when failed..
+probe_module() {
+ /sbin/modprobe $*
+ test $? = 0 && return 0
+ return 1
+}
+
+# unload the module if loaded
+# loops through all of the matches even if some fail to unload
+# $1 -- inclusion pattern
+# $2 -- exclusion pattern (optional)
+remove_module_pattern() {
+ local __LIST=$(/sbin/lsmod | grep -E "$1")
+ [[ -z "$__LIST" ]] && return
+
+ if [[ -n "$2" ]]; then
+ __LIST=$(builtin echo $__LIST | grep -Ev "$2")
+ fi
+ [[ -z "$__LIST" ]] && return
+
+ local __MOD=
+ builtin echo $__LIST | while read __MOD; do
+ __MOD=${__MOD%% *}
+ echo "Unloading module: $__MOD"
+ /sbin/rmmod $__MOD
+ evaluate_retval
+ done
+}
+
+start() {
+ [[ "$START_ALSA" == no ]] && exit 0
+
+ #
+ # insert all sound modules
+ #
+ for card in $CARDS; do
+ echo "Loading driver for $card..."
+ probe_module snd-$card
+ evaluate_retval
+ done
+
+ #
+ # insert sequencer modules
+ #
+ if [[ "$START_ALSA_SEQ" == yes ]] && [[ -r /proc/asound/seq/drivers ]];
then
+ local __LINE=
+ cat /proc/asound/seq/drivers | while read __LINE; do
+ if [[ -z "$__LINE" ]]; then
+ continue
+ fi
+
+ local __MOD=${__LINE%%,*}
+ if [[ "$__LINE" =~ ',loaded' ]]; then
+ echo "Built-in sequencer: $__MOD"
+ else
+ echo "Loading sequencer: $__MOD..."
+ /sbin/modprobe $__MOD
+ evaluate_retval
+ fi
+ done
+ fi
+
+ #
+ # load oss emulation
+ #
+ if [[ "$OSS" == yes ]]; then
+ echo "Loading OSS pcm emulation..."
+ /sbin/modprobe snd-pcm-oss
+ evaluate_retval
+ echo "Loading OSS mixer emulation..."
+ /sbin/modprobe snd-mixer-oss
+ evaluate_retval
+ fi
+}
+
+stop() {
+ remove_module_pattern "^snd" "(snd-page-alloc|snd_page_alloc)"
+
+ # remove the 2.2 soundcore module (if possible)
+ remove_module_pattern "^soundcore "
+
+ remove_module_pattern "^gameport "
+}
+
+status() {
+ if [[ -d /proc/asound ]]; then
+ echo "Sound driver loaded."
+ else
+ echo "Sound driver not loaded."
+ fi
+}
diff --git a/scripts/alsa-lib/alsa.conf b/scripts/alsa-lib/alsa.conf
new file mode 100644
index 0000000..26f4578
--- /dev/null
+++ b/scripts/alsa-lib/alsa.conf
@@ -0,0 +1,11 @@
+# start alsa via init
+START_ALSA=yes
+
+# start alsa sequencer modules
+START_ALSA_SEQ=yes
+
+# what soundcards to load
+CARDS="$CARD"
+
+# load oss emulation
+OSS=yes
diff --git a/scripts/alsa-utils/alsa-state b/scripts/alsa-utils/alsa-state
new file mode 100755
index 0000000..8e4757b
--- /dev/null
+++ b/scripts/alsa-utils/alsa-state
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/sysconfig/alsa
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+declare -r ASOUNDCFG=/etc/asound.state
+
+. /etc/init.d/smgl_init
+
+start() {
+ [[ "$START_ALSA" == no ]] && exit 0
+
+ #
+ # restore driver settings
+ #
+ if [[ -d /proc/asound ]]; then
+ if ! [[ -r "$ASOUNDCFG" ]]; then
+ echo "No mixer config in $ASOUNDCFG, you have to unmute your card!"
+ else
+ echo "Restoring settings..."
+ sleep 5
+ /usr/sbin/alsactl -F -f $ASOUNDCFG restore
+ evaluate_retval
+ fi
+ fi
+}
+
+stop() {
+ #
+ # store driver settings
+ #
+ echo "Saving settings..."
+ /usr/sbin/alsactl -f $ASOUNDCFG store
+ evaluate_retval
+
+ #
+ # mute master to avoid clicks at unload
+ #
+ /usr/bin/amixer set Master mute >/dev/null 2>&1
+}
diff --git a/scripts/amavisd-new/amavisd b/scripts/amavisd-new/amavisd
new file mode 100755
index 0000000..3420af1
--- /dev/null
+++ b/scripts/amavisd-new/amavisd
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/amavisd
+RUNLEVEL=3
+ARGS="-c /etc/amavisd.conf"
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Amavisd-new"
+ $PROGRAM $ARGS
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping Amavisd-new"
+ $PROGRAM $ARGS stop
+ evaluate_retval
+}
diff --git a/scripts/anubis/anubis b/scripts/anubis/anubis
new file mode 100755
index 0000000..2a04bae
--- /dev/null
+++ b/scripts/anubis/anubis
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/anubis
+PROGRAM_FLAGS="-m auth"
+RUNLEVEL=3
+NEEDS="+network"
+. /etc/init.d/smgl_init
diff --git a/scripts/apache-mod_ssl/apache b/scripts/apache-mod_ssl/apache
new file mode 100755
index 0000000..161ae15
--- /dev/null
+++ b/scripts/apache-mod_ssl/apache
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/httpsd/httpd.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ [ ! -d /var/run/httpsd ] && mkdir /var/run/httpsd
+ echo "Starting Apache web server..."
+ /usr/sbin/apachectl startssl
+ evaluate_retval
+}
+
+restart()
+{
+ echo "Restarting Apache web server..."
+ if [ -f $PIDFILE ]; then
+ /usr/sbin/apachectl restart
+ evaluate_retval
+ else
+ run_func start
+ fi
+}
+
+stop()
+{
+ echo "Stopping Apache web server..."
+ /usr/sbin/apachectl stop
+ evaluate_retval
+}
+
+status()
+{
+ getpids httpd
+ if [ -n "$pidlist" ]; then
+ echo "Apache is running with Process ID(s) $pidlist"
+ else
+ if [ -f $PIDFILE ]; then
+ echo "Apache is not running but $PIDFILE exists"
+ return 1
+ else
+ echo "Apache is not running"
+ fi
+ fi
+}
+
+reload()
+{
+ run_func restart
+}
diff --git a/scripts/apache/apache b/scripts/apache/apache
new file mode 100755
index 0000000..a6e87a1
--- /dev/null
+++ b/scripts/apache/apache
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/httpd/httpd.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ [ ! -d /var/run/httpd ] && mkdir /var/run/httpd
+ echo "Starting Apache web server..."
+ /usr/sbin/apachectl start
+ evaluate_retval
+}
+
+restart()
+{
+ echo "Restarting Apache web server..."
+ if [ -f $PIDFILE ]; then
+ /usr/sbin/apachectl restart
+ evaluate_retval
+ else
+ run_func start
+ fi
+}
+
+stop()
+{
+ echo "Stopping Apache web server..."
+ /usr/sbin/apachectl stop
+ evaluate_retval
+}
+
+status()
+{
+ getpids httpd
+ if [ -n "$pidlist" ]; then
+ echo "Apache is running with Process ID(s) $pidlist"
+ else
+ if [ -f $PIDFILE ]; then
+ echo "Apache is not running but $PIDFILE exists"
+ return 1
+ else
+ echo "Apache is not running"
+ fi
+ fi
+}
+
+reload()
+{
+ run_func restart
+}
diff --git a/scripts/apache2/apache b/scripts/apache2/apache
new file mode 100755
index 0000000..d8639f3
--- /dev/null
+++ b/scripts/apache2/apache
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+. /etc/sysconfig/apache
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/httpd.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Apache web server..."
+ /usr/sbin/apachectl $STARTCOMMAND
+ evaluate_retval
+}
+
+restart()
+{
+ echo "Restarting Apache web server..."
+ if [ -f $PIDFILE ]; then
+ /usr/sbin/apachectl restart
+ evaluate_retval
+ else
+ run_func start
+ fi
+}
+
+stop()
+{
+ echo "Stopping Apache web server..."
+ /usr/sbin/apachectl stop
+ evaluate_retval
+}
+
+status()
+{
+ getpids httpd
+ if [ -n "$pidlist" ]; then
+ echo "Apache is running with Process ID(s) $pidlist"
+ else
+ if [ -f $PIDFILE ]; then
+ echo "Apache is not running but $PIDFILE exists"
+ return 1
+ else
+ echo "Apache is not running"
+ fi
+ fi
+}
+
+reload()
+{
+ run_func restart
+}
diff --git a/scripts/apache2/apache.conf b/scripts/apache2/apache.conf
new file mode 100644
index 0000000..4cf1fc1
--- /dev/null
+++ b/scripts/apache2/apache.conf
@@ -0,0 +1,4 @@
+# should the server start in ssl or normal mode
+# "start" = normal mode
+# "startssl" = ssl mode
+STARTCOMMAND="start"
diff --git a/scripts/apache22/apache b/scripts/apache22/apache
new file mode 100755
index 0000000..3cabf23
--- /dev/null
+++ b/scripts/apache22/apache
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/httpd.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Apache web server..."
+ /usr/sbin/apachectl start
+ evaluate_retval
+}
+
+restart()
+{
+ echo "Restarting Apache web server..."
+ if [ -f $PIDFILE ]; then
+ /usr/sbin/apachectl restart
+ evaluate_retval
+ else
+ run_func start
+ fi
+}
+
+stop()
+{
+ echo "Stopping Apache web server..."
+ /usr/sbin/apachectl stop
+ evaluate_retval
+}
+
+status()
+{
+ getpids httpd
+ if [ -n "$pidlist" ]; then
+ echo "Apache is running with Process ID(s) $pidlist"
+ else
+ if [ -f $PIDFILE ]; then
+ echo "Apache is not running but $PIDFILE exists"
+ return 1
+ else
+ echo "Apache is not running"
+ fi
+ fi
+}
+
+reload()
+{
+ run_func restart
+}
diff --git a/scripts/apmd/apmd b/scripts/apmd/apmd
new file mode 100755
index 0000000..917c183
--- /dev/null
+++ b/scripts/apmd/apmd
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/apmd
+ARGS="-P /etc/apmd_proxy"
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+
+modprobe -q apm
diff --git a/scripts/arpwatch/arpwatch b/scripts/arpwatch/arpwatch
new file mode 100755
index 0000000..c5dd9d7
--- /dev/null
+++ b/scripts/arpwatch/arpwatch
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM="/usr/bin/arpwatch"
+ARGS="-i eth0 -f /var/lib/arpwatch/eth0.dat"
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/asterisk/asterisk b/scripts/asterisk/asterisk
new file mode 100755
index 0000000..6778090
--- /dev/null
+++ b/scripts/asterisk/asterisk
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+required_executable /usr/sbin/asterisk
+
+start()
+{
+ echo "Starting Asterisk"
+ /usr/sbin/asterisk
+ evaluate_retval
+ x=$?
+ [ ${x} -eq 0 ] && touch /var/lock/subsys/asterisk
+}
+
+stop()
+{
+ echo "Shutting down Asterisk"
+ killproc asterisk
+ x=$?
+ [ ${x} -eq 0 ] && rm -f /var/lock/subsys/asterisk
+}
+
+restart()
+{
+ run_func stop
+ run_func start
+}
+
+reload()
+{
+ echo "reloading Asterisk"
+ /usr/sbin/asterisk -rx 'reload' > /dev/null 2> /dev/null
+ evaluate_retval
+}
+
+status()
+{
+ if [[ -f /var/lock/subsys/asterisk ]]; then
+ statusproc asterisk
+ else
+ echo "Asterisk is not loaded"
+ fi
+}
+
+usage()
+{
+ echo "$0 {start|stop|restart|status|reload}"
+}
diff --git a/scripts/at/atd b/scripts/at/atd
new file mode 100755
index 0000000..8c17c5b
--- /dev/null
+++ b/scripts/at/atd
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PROGRAM=/sbin/atd
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
diff --git a/scripts/athcool/athcool b/scripts/athcool/athcool
new file mode 100755
index 0000000..50041ed
--- /dev/null
+++ b/scripts/athcool/athcool
@@ -0,0 +1,22 @@
+#!/bin/bash
+PROGRAM=/usr/sbin/athcool
+NAME="Athcool"
+RUNLEVEL=3
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting athcool..."
+ ${PROGRAM} on
+}
+
+stop() {
+ echo "Stoping athcool..."
+ ${PROGRAM} off
+}
+
+restart() {
+ stop &&
+ sleep 1 &&
+ start
+}
+
diff --git a/scripts/autofs/autofs b/scripts/autofs/autofs
new file mode 100644
index 0000000..9f6c99e
--- /dev/null
+++ b/scripts/autofs/autofs
@@ -0,0 +1,171 @@
+#! /bin/bash
+#
+# rc file for automount using a Sun-style "master map".
+# We first look for a local /etc/auto.master, then a YP
+# map with that name
+#
+
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PROGRAM=/usr/sbin/automount
+DAEMON=/usr/sbin/automount
+
+# check if program is installed
+#
+test -x $DAEMON || exit 5
+
+. /etc/init.d/smgl_init
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+export PATH
+
+# We can add local options here
+# e.g. localoptions='rsize=8192,wsize=8192'
+#
+localoptions=''
+
+#
+# Daemon options
+# e.g. --timeout 60
+#
+daemonoptions=
+
+# normal behavior of ps, please.
+#
+unset PS_PERSONALITY
+unset CMD_ENV
+
+# This function will build a list of automount commands to execute in
+# order to activate all the mount points. It is used to figure out
+# the difference of automount points in case of a reload
+#
+function getmounts()
+{
+#
+# Check for local maps to be loaded
+#
+if [ -f /etc/auto.master ]
+then
+ # We remove not only comments, but also "/-" since it stands for
+ # direct mounts which autofs doesn't support yet.
+ cat /etc/auto.master | sed -e '/^#/d' -e '/^$/d' -e '/^\/-[ \t]/d' | (
+ while read dir map options
+ do
+ if [ ! -z "$dir" -a ! -z "$map" \
+ -a x`echo "$map" | cut -c1` != 'x-' ]
+ then
+ #map=`echo "/etc/$map" | sed -e 's:^/etc//:/:'`
+ options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'`
+ if echo $options | grep -- '-t' >/dev/null 2>&1 ; then
+ mountoptions="--timeout $(echo $options | \
+ sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')"
+ else
+ mountoptions=""
+ fi
+ options=`echo "$options" | sed -e '
+ s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g
+ s/\(^\|[ \t]\)-/\1/g'`
+ if [ -x $map ]; then
+ echo "$DAEMON $daemonoptions $mountoptions $dir program $map
$options $localoptions"
+ elif [ -f $map ]; then
+ echo "$DAEMON $daemonoptions $mountoptions $dir file $map $options
$localoptions"
+ else
+ echo "$DAEMON $daemonoptions $mountoptions $dir yp `basename $map`
$options $localoptions"
+ fi
+ fi
+ done
+ ) | sed 's/ \+/ /g'
+ fi
+}
+
+#
+# Status lister.
+#
+status()
+{
+ echo "Configured Mount Points:"
+ echo "------------------------"
+ (unset -f echo;getmounts)
+ echo ""
+ echo "Active Mount Points:"
+ echo "--------------------"
+ ps -C automount -o command= | grep "^$DAEMON "
+}
+
+# return true if at least one pid is alive
+function alive()
+{
+ if [ -z "$*" ]; then
+ return 1
+ fi
+ for i in $*; do
+ if kill -0 $i 2> /dev/null; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+# See how we were called.
+#
+
+start() {
+ # Check if the automounter is already running?
+ #
+ if [ ! -f /var/lock/subsys/autofs ]; then
+ echo "Starting service automounter"
+ (unset -f echo;getmounts) | sh || return=1
+ touch /var/lock/autofs
+ fi
+}
+
+stop() {
+ pids=$(/bin/pidof $DAEMON)
+ kill -TERM $pids 2> /dev/null && sleep 1
+ count=1
+ while alive $pids; do
+ sleep 5
+ count=$(expr $count + 1)
+ if [ $count -gt 5 ]; then
+ echo "Giving up on automounter"
+ break;
+ fi
+ echo "Automounter not stopped yet: retrying... (attempt $count)"
+ done
+ if [ $count -gt 1 -a $count -le 10 ]; then
+ echo "Automounter stopped"
+ fi
+ rm -f /var/lock/autofs
+}
+
+restart()
+{
+ if [ ! -f /var/lock/autofs ]; then
+ echo "Automounter not running"
+ exit 1
+ fi
+ echo "Checking for changes to /etc/auto.master ...."
+ TMP1=`mktemp /tmp/autofs.XXXXXX` || { echo "could not make temp file" >&
2; exit 1; }
+ TMP2=`mktemp /tmp/autofs.XXXXXX` || { echo "could not make temp file" >&
2; exit 1; }
+ (unset -f echo; getmounts) >$TMP1
+ ps -C automount -o pid=,command= | grep " $DAEMON " | (
+ while read pid command; do
+ builtin echo "$command" >>$TMP2
+ if ! grep -q "^$command" $TMP1; then
+ (
+ while kill -USR2 $pid; do
+ sleep 3
+ done
+ ) &> /dev/null
+ echo "Stop $command"
+ fi
+ done
+ )
+ ( while read x; do
+ if ! grep -q "^$x" $TMP2; then
+ $x
+ echo "Start $x"
+ fi
+ done ) < $TMP1
+ rm -f $TMP1 $TMP2
+}
diff --git a/scripts/avahi/avahi-daemon b/scripts/avahi/avahi-daemon
new file mode 100644
index 0000000..6f12c23
--- /dev/null
+++ b/scripts/avahi/avahi-daemon
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+PIDFILE=/var/run/avahi-daemon/pid
+PROGRAM=/usr/sbin/avahi-daemon
+RUNLEVEL=3
+NEEDS="+network"
+ARGS="-D"
+
+. /etc/init.d/smgl_init
+
+stop()
+{
+ echo "Stopping ${NAME}..."
+ $PROGRAM -k
+ evaluate_retval
+}
+
+reload()
+{
+ echo "Reloading ${NAME}..."
+ $PROGRAM -r
+ evaluate_retval
+}
diff --git a/scripts/bacula/bacula-dir b/scripts/bacula/bacula-dir
new file mode 100755
index 0000000..d181409
--- /dev/null
+++ b/scripts/bacula/bacula-dir
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# the Bacula Director
+PROGRAM=/usr/sbin/bacula-dir
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/bacula/bacula-fd b/scripts/bacula/bacula-fd
new file mode 100755
index 0000000..83290df
--- /dev/null
+++ b/scripts/bacula/bacula-fd
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# the Bacula File daemon
+PROGRAM=/usr/sbin/bacula-fd
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/bacula/bacula-sd b/scripts/bacula/bacula-sd
new file mode 100755
index 0000000..be182e5
--- /dev/null
+++ b/scripts/bacula/bacula-sd
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# the Bacula Storage daemon
+PROGRAM=/usr/sbin/bacula-sd
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/bayonne2/bayonne b/scripts/bayonne2/bayonne
new file mode 100644
index 0000000..51c6563
--- /dev/null
+++ b/scripts/bayonne2/bayonne
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# description: Start/Stop bayonne telephony server
+#
+
+
+PROGRAM=/usr/sbin/bayonne
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+ARGS="-p"
+source /etc/init.d/smgl_functions
+
+
+#case $1 in
+# start)
+# echo "Starting Bayonne engine"
+## su -l "$FBRunUser" -s /bin/sh -m -c "$FB -start -forever"
+# evaluate_retval
+# ;;
+# stop)
+# echo "Stopping Bayonne engine"
+# su -l "$FBRunUser" -s /bin/sh -m -c "$FB -shut"
+# evaluate_retval
+# ;;
+
+# restart|reload)
+# echo "Restarting Bayonne engine"
+# $0 stop
+# $0 start
+# evaluate_retval
+# ;;
+# *)
+# echo "Usage: $0 {start|stop|restart}"
+# exit 1
+# ;;
+#esac
+
+
diff --git a/scripts/bfilter/bfilter b/scripts/bfilter/bfilter
new file mode 100755
index 0000000..81eb915
--- /dev/null
+++ b/scripts/bfilter/bfilter
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/bfilter
+NEEDS="+network"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/bind/named b/scripts/bind/named
new file mode 100755
index 0000000..a7ede50
--- /dev/null
+++ b/scripts/bind/named
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+case $1 in
+ start) echo "Starting chrooted Berkley Internet Name Domain"
+ loadproc named -u bind -t /etc/bind
+ ;;
+
+ reload) echo "Reloading Berkley Internet Name Domain"
+ reloadproc named SIGHUP
+ ;;
+
+ restart) $0 stop
+ $0 start
+ ;;
+
+ stop) echo "Stopping Berkley Internet Name Domain"
+ loadproc rndc stop
+ ;;
+
+ status) statusproc named
+ ;;
+
+ *) echo "Usage: $0 {start|stop|restart}"
+ ;;
+esac
diff --git a/scripts/bluez-utils/bluetooth b/scripts/bluez-utils/bluetooth
new file mode 100755
index 0000000..cb5d86f
--- /dev/null
+++ b/scripts/bluez-utils/bluetooth
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/hcid
+RUNLEVEL=3
+NEEDS="+local_fs"
+UART_CONF="/etc/bluetooth/uart"
+
+. /etc/init.d/smgl_init
+
+start_uarts() {
+ [ -f /usr/sbin/hciattach -a -f $UART_CONF ] || return
+ grep -v '^#' $UART_CONF | while read i; do
+ /usr/sbin/hciattach $i
+ done
+}
+
+stop_uarts() {
+ killproc hciattach > /dev/null 2>&1
+}
+
+start() {
+ echo "Starting $NAME..."
+ $PROGRAM
+ evaluate_retval
+
+ if [ -x /usr/sbin/sdpd ]; then
+ echo "Running sdpd..."
+ /usr/sbin/sdpd
+ evaluate_retval
+ fi
+
+ start_uarts
+
+ [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
+ touch /var/lock/subsys/bluetooth
+}
+
+stop() {
+ echo "Shutting down $NAME..."
+ killproc hcid
+
+ if [ -x /usr/sbin/sdpd ]; then
+ killproc sdpd
+ fi
+
+ stop_uarts
+ rm -f /var/lock/subsys/bluetooth
+}
+
+condrestart() {
+ [ -e /var/lock/subsys/bluetooth ] && (stop; start)
+}
+
+usage() {
+ echo "Usage $0 {start|stop|restart|condrestart}"
+}
diff --git a/scripts/bluez/bluetooth b/scripts/bluez/bluetooth
new file mode 100755
index 0000000..6edbbdc
--- /dev/null
+++ b/scripts/bluez/bluetooth
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/bluetoothd
+RUNLEVEL=3
+NEEDS="+local_fs"
+UART_CONF="/etc/bluetooth/uart"
+
+. /etc/init.d/smgl_init
+
+start_uarts() {
+ [ -f /usr/sbin/hciattach -a -f $UART_CONF ] || return
+ grep -v '^#' $UART_CONF | while read i; do
+ /usr/sbin/hciattach $i
+ done
+}
+
+stop_uarts() {
+ killproc hciattach > /dev/null 2>&1
+}
+
+start() {
+ echo "Starting $NAME..."
+ $PROGRAM
+ evaluate_retval
+
+ start_uarts
+
+ [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
+ touch /var/lock/subsys/bluetooth
+}
+
+stop() {
+ echo "Shutting down $NAME..."
+ killproc bluetoothd
+
+ stop_uarts
+ rm -f /var/lock/subsys/bluetooth
+}
+
+condrestart() {
+ [ -e /var/lock/subsys/bluetooth ] && (stop; start)
+}
+
+usage() {
+ echo "Usage $0 {start|stop|restart|condrestart}"
+}
diff --git a/scripts/bnbt/bnbt b/scripts/bnbt/bnbt
new file mode 100644
index 0000000..3c9a6d2
--- /dev/null
+++ b/scripts/bnbt/bnbt
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/bnbt
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ loadproc bnbt
+}
+
+stop() {
+ stopproc bnbt
+}
+
+status() {
+ statusproc bnbt
+}
diff --git a/scripts/boinc/boinc b/scripts/boinc/boinc
new file mode 100755
index 0000000..cc522d5
--- /dev/null
+++ b/scripts/boinc/boinc
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+. /etc/sysconfig/boinc
+
+PIDFILE="/var/run/boinc.pid"
+PROGRAM="/usr/bin/boinc_client-svn"
+ARGS="-dir ${BOINC_HOME}"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+function start()
+{
+ if [ -e ${PIDFILE} ]; then
+ echo "Boinc is already running"
+ exit 1
+ else
+ touch ${PIDFILE}
+ fi
+
+ if ! [ -e ${BOINC_LOGDIR} ]; then
+ mkdir -p ${BOINC_LOGDIR}
+ chown boinc:boinc ${BOINC_LOGDIR}
+ fi
+
+ if ! [ -e ${BOINC_HOME} ]; then
+ mkdir -p ${BOINC_HOME}
+ chown boinc:boinc ${BOINC_HOME}
+ echo "Starting boinc..."
+ cd ${BOINC_HOME}
+ ${PROGRAM} ${ARGS} -attach_project ${BOINC_URL} ${BOINC_KEY}
${BOINC_PARMS} >> ${BOINC_LOG} 2>>${$BOINC_ERROR} &
+ else
+ echo "Starting boinc..."
+ cd ${BOINC_HOME}
+ ${PROGRAM} ${ARGS} ${BOINC_PARMS} >> ${BOINC_LOG} 2>>${BOINC_ERROR} &
+ fi
+}
+
+function stop() {
+ echo "Stopping boinc..."
+ killall -HUP ${PROGRAM}
+ rm -f ${PIDFILE}
+}
+
+function restart() {
+ stop &&
+ sleep 2 &&
+ start
+}
diff --git a/scripts/boinc/boinc.conf b/scripts/boinc/boinc.conf
new file mode 100644
index 0000000..b2fd182
--- /dev/null
+++ b/scripts/boinc/boinc.conf
@@ -0,0 +1,15 @@
+BOINC_HOME='/var/lib/boinc'
+BOINC_URL=''
+BOINC_KEY=''
+BOINC_LOGDIR=/var/log/boinc
+BOINC_LOG=${BOINC_LOGDIR}/boinc-log
+BOINC_ERROR=${BOINC_LOGDIR}/boinc-errors
+
+# Boinc optional parameters
+
+#-return_results_immediately contact server when have results
+#-check_all_logins for idle detection, check remote logins too
+#-allow_remote_gui_rpc allow remote GUI RPC connections
+#-no_gui_rpc don't allow GUI RPC, don't make socket
+
+BOINC_PARMS=""
diff --git a/scripts/boxbackup/bbackupd b/scripts/boxbackup/bbackupd
new file mode 100755
index 0000000..b5d7076
--- /dev/null
+++ b/scripts/boxbackup/bbackupd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/bbackupd
+ARGS="-v"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/boxbackup/bbstored b/scripts/boxbackup/bbstored
new file mode 100755
index 0000000..e4da2fa
--- /dev/null
+++ b/scripts/boxbackup/bbstored
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/bbstored
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/canna/canna b/scripts/canna/canna
new file mode 100755
index 0000000..e96b154
--- /dev/null
+++ b/scripts/canna/canna
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+PROGRAM="/usr/bin/cannaserver"
+ARGS="-syslog"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting cannaserver..."
+ /usr/bin/cannaserver
+}
+
+stop () {
+ echo "Stopping cannaserver..."
+ /usr/bin/cannakill
+}
diff --git a/scripts/cdemu-daemon/cdemu-daemon
b/scripts/cdemu-daemon/cdemu-daemon
new file mode 100644
index 0000000..a8421e0
--- /dev/null
+++ b/scripts/cdemu-daemon/cdemu-daemon
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/cdemud
+ARGS=""
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/cdemu-daemon
+
+start() {
+ # Load module
+ echo -n $" Inserting kernel module: "
+ /sbin/modprobe cdemu param_devices=$DEVICES >/dev/null 2>&1
+ evaluate_retval
+
+ # Loop until nodes get created...
+ echo -n $" Waiting for nodes to get created: "
+ until [ -c "/dev/cdemu_ctl$(($DEVICES - 1))" ]; do
+ echo -n ""
+ done
+
+ evaluate_retval
+
+ # Audio backend arguments for daemon
+ if [ -n "$AUDIO_BACKEND" ]; then
+ DAEMON_ARGS="$DAEMON_ARGS --audio=$AUDIO_BACKEND"
+ fi
+ if [ -n "$AUDIO_DEVICE" ]; then
+ DAEMON_ARGS="$DAEMON_ARGS --audio-device=$AUDIO_DEVICE"
+ fi
+
+ # Start daemon
+ echo -n $" Starting daemon: "
+ loadproc $PROGRAM $DAEMON_ARGS
+ evaluate_retval
+}
+
diff --git a/scripts/cdemu-daemon/cdemu-daemon.conf
b/scripts/cdemu-daemon/cdemu-daemon.conf
new file mode 100644
index 0000000..0edba56
--- /dev/null
+++ b/scripts/cdemu-daemon/cdemu-daemon.conf
@@ -0,0 +1,14 @@
+#
+# Number of devices to create
+#
+DEVICES=1
+
+#
+# Set audio backend (only ALSA so far)
+#
+#AUDIO_BACKEND="alsa"
+
+#
+# Set audio device
+#
+#AUDIO_DEVICE
diff --git a/scripts/cherokee/cherokee b/scripts/cherokee/cherokee
new file mode 100644
index 0000000..7bfdd55
--- /dev/null
+++ b/scripts/cherokee/cherokee
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting cherokee..."
+ daemon --name cherokee cherokee
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping cherokee..."
+ daemon --name cherokee --stop
+ evaluate_retval
+}
+
+restart() {
+ echo "Restarting cherokee..."
+ daemon --name cherokee --restart
+ evaluate_retval
+}
diff --git a/scripts/chpax/smgl-chpax b/scripts/chpax/smgl-chpax
new file mode 100755
index 0000000..6ecdc2e
--- /dev/null
+++ b/scripts/chpax/smgl-chpax
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+RUNLEVEL=S
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+case $1 in
+ start) if [ -f /etc/chpax.cfg ] ; then
+ echo "Running chpax.sh..."
+ loadproc /usr/sbin/chpax.sh
+ fi
+ ;;
+
+ stop) exit 0
+ ;;
+
+ *) echo "Usage: $0 {start|stop}"
+ exit 1
+ ;;
+esac
diff --git a/scripts/chrony/chrony b/scripts/chrony/chrony
new file mode 100644
index 0000000..05dfc21
--- /dev/null
+++ b/scripts/chrony/chrony
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/chronyd
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/clamav/clamd b/scripts/clamav/clamd
new file mode 100755
index 0000000..f787666
--- /dev/null
+++ b/scripts/clamav/clamd
@@ -0,0 +1,14 @@
+#! /bin/bash
+#
+#
+# Startup/shutdown script for clam-antivirus
+#
+#
+# Start or stop clam-antivirus based upon the first argument to the script.
+#
+
+RUNLEVEL=3
+NEEDS="+network"
+#PROVIDES="antivirus"
+PROGRAM=/usr/sbin/clamd
+. /etc/init.d/smgl_init
diff --git a/scripts/clamav/freshclam b/scripts/clamav/freshclam
new file mode 100755
index 0000000..2722569
--- /dev/null
+++ b/scripts/clamav/freshclam
@@ -0,0 +1,6 @@
+#!/bin/bash
+PROGRAM=/usr/bin/freshclam
+RUNLEVEL=3
+NEEDS="+network"
+ARGS="-d"
+. /etc/init.d/smgl_init
diff --git a/scripts/coda-client/venus b/scripts/coda-client/venus
new file mode 100644
index 0000000..a8d4d21
--- /dev/null
+++ b/scripts/coda-client/venus
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# SMGL init script for venus
+#
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+MOUNTPOINT=/coda
+
+. /etc/init.d/smgl_init
+
+
+[ -f ${exec_prefix}/sbin/venus ] || exit 0
+
+start()
+{
+ required_executable /usr/sbin/codaconfedit
+ required_executable /usr/sbin/coda-client-logrotate
+ required_executable /usr/sbin/venus
+
+ # overridden from the venus.conf
+ [ -f ${exec_prefix}/sbin/codaconfedit ] && .
`${exec_prefix}/sbin/codaconfedit venus.conf`
+
+ echo "Starting Venus"
+ loadproc /usr/sbin/coda-client-logrotate
+ loadproc /usr/sbin/updatesrv
+ loadproc /usr/sbin/venus
+}
+
+stop()
+{
+ echo "Stopping Venus"
+ killproc /usr/bin/venus
+ umount $MOUNTPOINT
+}
diff --git a/scripts/coda-server/auth2 b/scripts/coda-server/auth2
new file mode 100644
index 0000000..55dbdf8
--- /dev/null
+++ b/scripts/coda-server/auth2
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# SMGL init script for the auth server of codafs
+#
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ if [ "`cat /vice/hostname`" != "`cat /vice/db/scm`" ]; then
+ FLAGS="$FLAGS -chk "
+ fi
+
+ required_executable /usr/sbin/auth2
+ echo "Starting Coda authentification server"
+ loadproc /usr/sbin/auth2 $FLAGS
+}
+
+stop()
+{
+ echo "Stopping Coda authentification server"
+ killproc /usr/sbin/auth2
+}
diff --git a/scripts/coda-server/codasrv b/scripts/coda-server/codasrv
new file mode 100644
index 0000000..5d41c23
--- /dev/null
+++ b/scripts/coda-server/codasrv
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# SMGL init script for the codafs server
+#
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+SCMFILE=/vice/db/scm
+
+. /etc/init.d/smgl_init
+
+VICE=/vice
+VICESRV=${VICE}/srv
+PIDDIR=${VICE}/srv
+
+start()
+{
+ required_executable /usr/sbin/volutil
+ required_executable /usr/sbin/codasrv
+ required_executable /usr/sbin/startserver
+
+ if [ ! -f ${VICESRV}/CRASH ]; then
+ echo "Starting Coda server"
+ loadproc /usr/sbin/volutil
+ loadproc /usr/sbin/codasrv
+ loadproc /usr/sbin/startserver
+ else
+ echo "`date`: found CRASH, srv not started." >> ${VICE}/srv/SrvErr
+ echo "found CRASH file, srv not started."
+ fi
+
+}
+
+
+stop()
+{
+ volutil shutdown
+ echo "Sleeping 30 secs to let srv shutdown..."
+
+ # Normally, the upper step is sufficient
+ # But in the initial script there was an "hard-stop" action
+ # which did the following :
+ #
+ # echo "Stopping Coda server"
+ # killproc /usr/sbin/codasrv
+ #
+ # It might be necessary to do this...
+ # I need some testing !
+}
diff --git a/scripts/coda-server/update b/scripts/coda-server/update
new file mode 100644
index 0000000..509bbbd
--- /dev/null
+++ b/scripts/coda-server/update
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# SMGL init script for the update server of codafs
+#
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+SCMFILE=/vice/db/scm
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ required_executable /usr/sbin/rpc2portmap
+ required_executable /usr/sbin/updatesrv
+ required_executable /usr/sbin/updateclnt
+
+ echo "Starting Coda update server"
+ loadproc /usr/sbin/rpc2portmap
+ loadproc /usr/sbin/updatesrv
+ loadproc /usr/sbin/updateclnt -h `cat $SCMFILE`
+}
+
+stop()
+{
+ echo "Stopping Coda update server"
+ killproc /usr/sbin/updateclnt
+ killproc /usr/sbin/updatesrv
+ killproc /usr/sbin/rpc2portmap
+}
diff --git a/scripts/console-tools/keymap.conf
b/scripts/console-tools/keymap.conf
new file mode 100644
index 0000000..e8c1be1
--- /dev/null
+++ b/scripts/console-tools/keymap.conf
@@ -0,0 +1,25 @@
+# Keymap to use for the system keyboard.
+KEYMAP=defkeymap
+
+# Includemaps to load.
+INCLUDEMAPS=
+
+# Arguments passed to the consolechars program. Use this to set the
+# console font and character map.
+# For example, to use Western European font and charmap:
+# CONSOLECHARS_ARGS="-f lat1-16 -m iso15"
+# Notice: TTY_NUMS must be defined for this to have effect.
+CONSOLECHARS_ARGS=
+
+# Consoles for which to apply font, charmap and unicode settings. If
+# value "*" is given, settings will be enabled for all available
+# console nodes.
+# Example: TTY_NUMS="1 2 3"
+# Notice: This must be defined for CONSOLECHARS_ARGS and UNICODE_START
+# to have effect.
+TTY_NUMS=
+
+# Toggle unicode. Unicode is enabled if variable is set (any value will
+# do).
+# Notice: TTY_NUMS must be defined for this to have effect.
+UNICODE_START=
diff --git a/scripts/console-tools/keymap.sh b/scripts/console-tools/keymap.sh
new file mode 100755
index 0000000..1b1babc
--- /dev/null
+++ b/scripts/console-tools/keymap.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+PROGRAM=/bin/loadkeys
+RUNLEVEL=S
+NEEDS="+local_fs"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/keymap
+. /etc/sysconfig/devices
+
+dropfile=/var/tmp/keymap.drop
+
+start()
+{
+ [[ "$TTY_NUMS" ]] && [[ "$CONSOLECHARS_ARGS" ]] &&
+ required_executable /usr/bin/consolechars
+ [[ "$KEYMAP$INCLUDEMAPS" ]] &&
+ required_executable /bin/loadkeys
+
+ if [[ "$KEYMAP" ]]; then
+ echo "$(/bin/loadkeys $KEYMAP 2>&1)"
+ evaluate_retval
+ fi
+
+ for a in $INCLUDEMAPS; do
+ [[ $(find /usr/share/keymaps/ -type f -name "$a.inc*" 2>/dev/null) ]] &&
+ [[ ! $(find /usr/share/keymaps/ -type f -name "$a.kmap*" 2>/dev/null) ]]
&&
+ a="$a.inc"
+ echo "$(/bin/loadkeys $a 2>&1)"
+ evaluate_retval
+ done
+
+ [[ "$DEVICES" == "devfs" ]] && DEV_TTY="vc/" || DEV_TTY="tty"
+
+ if [[ "$UNICODE_START" ]]; then
+ required_executable /usr/bin/unicode_start
+ /usr/bin/kbd_mode -u
+ fi
+
+ if [[ "$TTY_NUMS" == '*' ]]; then
+ TTY_NUMS=
+ for a in $(grep ^tty.*: /etc/inittab); do
+ TTY_NUMS="$TTY_NUMS $(expr "$a" : 'tty\([0-9]*\):.*')"
+ done
+ fi
+
+ for n in $TTY_NUMS; do
+ echo "Loading settings for $DEV_TTY$n..."
+ if [[ "$CONSOLECHARS_ARGS" ]]; then
+ /usr/bin/consolechars -v $CONSOLECHARS_ARGS --tty=/dev/$DEV_TTY$n
+ evaluate_retval
+ fi
+ [[ "$UNICODE_START" ]] && /bin/echo -ne "\033%G" > /dev/$DEV_TTY$n
+ done
+
+ [[ -f $dropfile ]] && rm $dropfile
+ STATUS_VARS="KEYMAP INCLUDEMAPS CONSOLECHARS_ARGS TTY_NUMS UNICODE_START
DEV_TTY"
+ for a in $STATUS_VARS; do
+ /bin/echo "$a=\"${!a}\"" >> $dropfile
+ done
+}
+
+stop()
+{
+ [[ "$TTY_NUMS" ]] && [[ "$CONSOLECHARS_ARGS" ]] &&
+ required_executable /usr/bin/consolechars
+
+ [[ -f $dropfile ]] && . $dropfile && rm $dropfile
+
+ [[ "$KEYMAP$INCLUDEMAPS" ]] &&
+ required_executable /bin/loadkeys &&
+ echo "$(/bin/loadkeys defkeymap 2>&1)"
+
+ [[ "$UNICODE_START" ]] &&
+ required_executable /usr/bin/unicode_stop &&
+ /usr/bin/kbd_mode -a
+
+ for n in $TTY_NUMS; do
+ echo "Unloading settings for $DEV_TTY$n..."
+ [[ "$UNICODE_START" ]] && /bin/echo -ne '\033%@' > /dev/$DEV_TTY$n
+ if [[ "$CONSOLECHARS_ARGS" ]]; then
+ /usr/bin/consolechars -v -d --tty=/dev/$DEV_TTY$n
+ evaluate_retval
+ fi
+ done
+}
+
+status()
+{
+ if [[ ! -f $dropfile ]]; then
+ echo "No status info available."
+ return 1
+ fi
+
+ . $dropfile
+
+ echo "KEYMAP=\"$KEYMAP\""
+ echo "INCLUDEMAPS=\"$INCLUDEMAPS\""
+ echo "CONSOLECHARS_ARGS=\"$CONSOLECHARS_ARGS\""
+ echo "TTY_NUMS=\"$TTY_NUMS\""
+ echo "UNICODE_START=\"$UNICODE_START\""
+}
diff --git a/scripts/courier-authlib/courier-authlib
b/scripts/courier-authlib/courier-authlib
new file mode 100755
index 0000000..9a55a1a
--- /dev/null
+++ b/scripts/courier-authlib/courier-authlib
@@ -0,0 +1,54 @@
+#! /bin/sh
+#
+# chkconfig: 2345 15 85
+# description: Authlib - Courier authentication library.
+#
+#
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+. /etc/init.d/smgl_functions
+
+prefix="/usr"
+exec_prefix="/usr"
+sysconfdir="/etc"
+sbindir="/usr/sbin"
+
+if test ! -f /etc/courier/authlib/authdaemonrc
+then
+ echo "/etc/courier/authlib/authdaemonrc does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+case "$1" in
+start)
+ cd /
+ # Start daemons.
+ touch /var/lock/subsys/courier-authlib
+
+ echo -n "Starting Courier authentication services:"
+
+ $sbindir/authdaemond start
+
+ echo " authdaemond"
+ ;;
+stop)
+ echo -n "Stopping Courier authentication services:"
+
+ $sbindir/authdaemond stop
+
+ echo " authdaemond"
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+reload)
+ echo -n "Starting Courier authentication services:"
+
+ $sbindir/authdaemond restart
+
+ echo " authdaemond"
+ ;;
+esac
+exit 0
diff --git a/scripts/courier-imap/courier-imap
b/scripts/courier-imap/courier-imap
new file mode 100755
index 0000000..7850607
--- /dev/null
+++ b/scripts/courier-imap/courier-imap
@@ -0,0 +1,60 @@
+#! /bin/sh
+# $Id: imapd.rc.in,v 1.22 2002/12/24 02:31:40 mrsam Exp $
+#
+# Copyright 1998 - 2002 Double Precision, Inc.
+# See COPYING for distribution information.
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+. /etc/init.d/smgl_functions
+
+prefix=/usr
+exec_prefix=/usr
+bindir=${exec_prefix}/bin
+libexecdir=/usr/libexec/courier-imap
+
+TLS_CACHEFILE=""
+. /etc/courier-imap/imapd-ssl
+. /etc/courier-imap/imapd
+
+case $1 in
+start)
+ LIBAUTHMODULES=""
+ for f in `builtin echo $AUTHMODULES`; do
+ LIBAUTHMODULES="$LIBAUTHMODULES ${libexecdir}/authlib/$f"
+ done
+
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ /bin/env - ${libexecdir}/authlib/authdaemond start
+ fi
+
+ if test "$TLS_CACHEFILE" != ""; then
+ rm -f $TLS_CACHEFILE
+ fi
+
+ ulimit -v $IMAP_ULIMITD
+ /bin/env - /bin/sh -c " set -a ;
+ prefix=/usr ;
+ exec_prefix=/usr ;
+ bindir=${exec_prefix}/bin ;
+ libexecdir=${libexecdir} ;
+ . /etc/courier-imap/imapd ; \
+ . /etc/courier-imap/imapd-ssl ; \
+ IMAP_STARTTLS=$IMAPDSTARTTLS ; export IMAP_STARTTLS ;
\
+ TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
+ ${libexecdir}/couriertcpd -address=$ADDRESS \
+ -stderrlogger=${exec_prefix}/sbin/courierlogger \
+ -stderrloggername=imapd \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ -pid=$PIDFILE $TCPDOPTS \
+ $PORT ${exec_prefix}/sbin/imaplogin $LIBAUTHMODULES \
+ ${exec_prefix}/bin/imapd Maildir"
+ ;;
+stop)
+ ${libexecdir}/couriertcpd -pid=$PIDFILE -stop
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ ${libexecdir}/authlib/authdaemond stop
+ fi
+ ;;
+esac
+exit 0
diff --git a/scripts/courier-imap/courier-imap-ssl
b/scripts/courier-imap/courier-imap-ssl
new file mode 100755
index 0000000..6c73d87
--- /dev/null
+++ b/scripts/courier-imap/courier-imap-ssl
@@ -0,0 +1,61 @@
+#! /bin/sh
+# $Id: imapd-ssl.rc.in,v 1.14 2002/12/24 02:31:40 mrsam Exp $
+#
+# Copyright 1998 - 2002 Double Precision, Inc.
+# See COPYING for distribution information.
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+. /etc/init.d/smgl_functions
+
+prefix=/usr
+exec_prefix=/usr
+bindir=${exec_prefix}/bin
+libexecdir=/usr/libexec/courier-imap
+
+TLS_CACHEFILE=""
+. /etc/courier-imap/imapd
+. /etc/courier-imap/imapd-ssl
+
+case $1 in
+start)
+ LIBAUTHMODULES=""
+ for f in `builtin echo $AUTHMODULES`; do
+ LIBAUTHMODULES="$LIBAUTHMODULES ${libexecdir}/authlib/$f"
+ done
+
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ /bin/env - ${libexecdir}/authlib/authdaemond start
+ fi
+
+ if test "$TLS_CACHEFILE" != ""; then
+ rm -f $TLS_CACHEFILE
+ fi
+
+ ulimit -v $IMAP_ULIMITD
+ /bin/env - /bin/sh -c " set -a ;
+ prefix=/usr ;
+ exec_prefix=/usr ;
+ bindir=${exec_prefix}/bin ;
+ libexecdir=${libexecdir} ;
+ . /etc/courier-imap/imapd ; \
+ . /etc/courier-imap/imapd-ssl ; \
+ IMAP_TLS=1; export IMAP_TLS; \
+
+ ${libexecdir}/couriertcpd -address=$SSLADDRESS \
+ -stderrlogger=${exec_prefix}/sbin/courierlogger \
+ -stderrloggername=imapd-ssl \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ -pid=$SSLPIDFILE $TCPDOPTS \
+ $SSLPORT $COURIERTLS -server -tcpd \
+ ${exec_prefix}/sbin/imaplogin $LIBAUTHMODULES \
+ ${exec_prefix}/bin/imapd Maildir"
+ ;;
+stop)
+ ${libexecdir}/couriertcpd -pid=$SSLPIDFILE -stop
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ ${libexecdir}/authlib/authdaemond stop
+ fi
+ ;;
+esac
+exit 0
diff --git a/scripts/courier-imap/courier-pop
b/scripts/courier-imap/courier-pop
new file mode 100755
index 0000000..3128a24
--- /dev/null
+++ b/scripts/courier-imap/courier-pop
@@ -0,0 +1,54 @@
+#! /bin/sh
+# $Id: pop3d.rc.in,v 1.8 2002/10/25 12:15:17 mrsam Exp $
+#
+# Copyright 1998 - 2002 Double Precision, Inc.
+# See COPYING for distribution information.
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+. /etc/init.d/smgl_functions
+
+prefix=/usr
+exec_prefix=/usr
+bindir=${exec_prefix}/bin
+libexecdir=/usr/libexec/courier-imap
+
+. /etc/courier-imap/pop3d-ssl
+. /etc/courier-imap/pop3d
+
+case $1 in
+start)
+ LIBAUTHMODULES=""
+ for f in `builtin echo $AUTHMODULES`; do
+ LIBAUTHMODULES="$LIBAUTHMODULES ${libexecdir}/authlib/$f"
+ done
+
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ /bin/env - ${libexecdir}/authlib/authdaemond start
+ fi
+
+ /bin/env - /bin/sh -c " set -a ;
+ prefix=/usr ;
+ exec_prefix=/usr ;
+ bindir=${exec_prefix}/bin ;
+ libexecdir=${libexecdir} ;
+ . /etc/courier-imap/pop3d ; \
+ . /etc/courier-imap/pop3d-ssl ; \
+ TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
+ export TLS_PROTOCOL ;
+ ${libexecdir}/couriertcpd -address=$ADDRESS \
+ -stderrlogger=${exec_prefix}/sbin/courierlogger \
+ -stderrloggername=pop3d \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ -pid=$PIDFILE $TCPDOPTS \
+ $PORT ${exec_prefix}/sbin/pop3login $LIBAUTHMODULES \
+ ${exec_prefix}/bin/pop3d Maildir"
+ ;;
+stop)
+ ${libexecdir}/couriertcpd -pid=$PIDFILE -stop
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ ${libexecdir}/authlib/authdaemond stop
+ fi
+ ;;
+esac
+exit 0
diff --git a/scripts/courier-imap/courier-pop-ssl
b/scripts/courier-imap/courier-pop-ssl
new file mode 100755
index 0000000..3433409
--- /dev/null
+++ b/scripts/courier-imap/courier-pop-ssl
@@ -0,0 +1,56 @@
+#! /bin/sh
+# $Id: pop3d-ssl.rc.in,v 1.7 2002/10/25 12:15:17 mrsam Exp $
+#
+# Copyright 1998 - 2002 Double Precision, Inc.
+# See COPYING for distribution information.
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+. /etc/init.d/smgl_functions
+
+prefix=/usr
+exec_prefix=/usr
+bindir=${exec_prefix}/bin
+libexecdir=/usr/libexec/courier-imap
+
+. /etc/courier-imap/pop3d
+. /etc/courier-imap/pop3d-ssl
+
+case $1 in
+start)
+ LIBAUTHMODULES=""
+ for f in `builtin echo $AUTHMODULES`; do
+ LIBAUTHMODULES="$LIBAUTHMODULES ${libexecdir}/authlib/$f"
+ done
+
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ /bin/env - ${libexecdir}/authlib/authdaemond start
+ fi
+
+ /bin/env - /bin/sh -c " set -a ;
+ prefix=/usr ;
+ exec_prefix=/usr ;
+ bindir=${exec_prefix}/bin ;
+ libexecdir=${libexecdir} ;
+ . /etc/courier-imap/pop3d ; \
+ . /etc/courier-imap/pop3d-ssl ; \
+ POP3_TLS=1; export POP3_TLS; \
+ POP3_STARTTLS=NO; export POP3_STARTTLS; \
+ POP3_TLS_REQUIRED=0; export POP3_TLS_REQUIRED; \
+ ${libexecdir}/couriertcpd -address=$SSLADDRESS \
+ -stderrlogger=${exec_prefix}/sbin/courierlogger \
+ -stderrloggername=pop3d-ssl \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ -pid=$SSLPIDFILE $TCPDOPTS \
+ $SSLPORT $COURIERTLS -server -tcpd \
+ ${exec_prefix}/sbin/pop3login $LIBAUTHMODULES \
+ ${exec_prefix}/bin/pop3d Maildir"
+ ;;
+stop)
+ ${libexecdir}/couriertcpd -pid=$SSLPIDFILE -stop
+ if test -x ${libexecdir}/authlib/authdaemond; then
+ ${libexecdir}/authlib/authdaemond stop
+ fi
+ ;;
+esac
+exit 0
diff --git a/scripts/courier/courier-imap b/scripts/courier/courier-imap
new file mode 100755
index 0000000..3171cd0
--- /dev/null
+++ b/scripts/courier/courier-imap
@@ -0,0 +1,61 @@
+#! /bin/sh
+# $Id: imapd.rc.in,v 1.24 2005/07/02 02:11:16 mrsam Exp $
+#
+# Copyright 1998 - 2005 Double Precision, Inc.
+# See COPYING for distribution information.
+
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+
+. /etc/init.d/smgl_functions
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+sysconfdir=/etc/courier
+
+if test ! -f /etc/courier/imapd
+then
+ echo "/etc/courier/imapd does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+if test ! -f /etc/courier/imapd-ssl
+then
+ echo "/etc/courier/imapd-ssl does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+. /etc/courier/imapd-ssl
+. /etc/courier/imapd
+
+case $1 in
+start)
+ umask $IMAP_UMASK
+ ulimit -v $IMAP_ULIMITD
+ /bin/env -i /bin/sh -c " set -a ; \
+ prefix=/usr ; \
+ exec_prefix=/usr ; \
+ sbindir=${exec_prefix}/sbin ; \
+ bindir=/usr/bin ; \
+ . /etc/courier/imapd ; \
+ . /etc/courier/imapd-ssl ; \
+ IMAP_STARTTLS=$IMAPDSTARTTLS ; \
+ PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
+ TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
+ /usr/sbin/courierlogger -pid=$PIDFILE -start $LOGGEROPTS \
+ ${exec_prefix}/sbin/couriertcpd -address=$ADDRESS \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ $TCPDOPTS \
+ $PORT ${exec_prefix}/libexec/courier/imaplogin \
+ /usr/bin/imapd ${MAILDIRPATH}"
+ ;;
+stop)
+ /usr/sbin/courierlogger -pid=$PIDFILE -stop
+ ;;
+restart)
+ /usr/sbin/courierlogger -pid=$PIDFILE -restart
+ ;;
+esac
+exit 0
diff --git a/scripts/courier/courier-imap-ssl
b/scripts/courier/courier-imap-ssl
new file mode 100755
index 0000000..dc9c28d
--- /dev/null
+++ b/scripts/courier/courier-imap-ssl
@@ -0,0 +1,59 @@
+#! /bin/sh
+# $Id: imapd-ssl.rc.in,v 1.22 2005/07/02 22:53:19 mrsam Exp $
+#
+# Copyright 1998 - 2005 Double Precision, Inc.
+# See COPYING for distribution information.
+
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+
+. /etc/init.d/smgl_functions
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+bindir=/usr/bin
+sysconfdir=/etc/courier
+
+if test ! -f /etc/courier/imapd
+then
+ echo "/etc/courier/imapd does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+if test ! -f /etc/courier/imapd-ssl
+then
+ echo "/etc/courier/imapd-ssl does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+. /etc/courier/imapd
+. /etc/courier/imapd-ssl
+
+case $1 in
+start)
+ umask $IMAP_UMASK
+ ulimit -v $IMAP_ULIMITD
+ /bin/env -i /bin/sh -c " set -a ;
+ prefix=/usr ; \
+ exec_prefix=/usr ; \
+ sbindir=${exec_prefix}/sbin ; \
+ bindir=/usr/bin ; \
+ . /etc/courier/imapd ; \
+ . /etc/courier/imapd-ssl ; \
+ PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
+ IMAP_TLS=1; \
+ /usr/sbin/courierlogger -pid=$SSLPIDFILE -start
$SSLLOGGEROPTS \
+ ${exec_prefix}/sbin/couriertcpd -address=$SSLADDRESS \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ $TCPDOPTS \
+ $SSLPORT $COURIERTLS -server -tcpd \
+ ${exec_prefix}/libexec/courier/imaplogin \
+ /usr/bin/imapd ${MAILDIRPATH}"
+ ;;
+stop)
+ /usr/sbin/courierlogger -pid=$SSLPIDFILE -stop
+ ;;
+esac
+exit 0
diff --git a/scripts/courier/courier-mta b/scripts/courier/courier-mta
new file mode 100755
index 0000000..3c37292
--- /dev/null
+++ b/scripts/courier/courier-mta
@@ -0,0 +1,91 @@
+#! /bin/sh
+#
+# $Id: esmtpd.in,v 1.18 2005/02/16 23:42:13 mrsam Exp $
+#
+# Copyright 1998 - 2005 Double Precision, Inc. See COPYING for
+# distribution information.
+#
+# This is a simple script to start/stop the smtp port daemon, courieresmtpd.
+#
+# Argument "start" starts the daemon.
+# Argument "stop" stops the daemon (just the listening daemon).
+# Argument "restart" rereads the smtpaccess.dat file.
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+
+. /etc/init.d/smgl_functions
+
+prefix="/usr"
+exec_prefix="/usr"
+sysconfdir="/etc/courier"
+sbindir="/usr/sbin"
+
+cd ${prefix} || exit 1
+#case `basename $0` in
+#esmtpd)
+# configfiles="${sysconfdir}/esmtpd"
+# . ${sysconfdir}/esmtpd
+# ;;
+#esmtpd-msa)
+# configfiles="${sysconfdir}/esmtpd ${sysconfdir}/esmtpd-msa"
+# . ${sysconfdir}/esmtpd
+# . ${sysconfdir}/esmtpd-msa
+# ;;
+#*)
+# echo "Must be invoked as esmtpd or esmtpd-msa" >&2
+# exit 1
+# ;;
+#esac
+
+case $1 in
+start)
+ ;;
+stop)
+ ${sbindir}/couriertcpd -pid=$PIDFILE -stop
+ exit 0
+ ;;
+restart)
+ ${sbindir}/couriertcpd -pid=$PIDFILE -restart
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac
+
+if test "${ACCESSFILE}" != ""
+then
+ if test ! -f "$ACCESSFILE.dat"
+ then
+ ACCESSFILE=""
+ else
+ ACCESSFILE="-access=${ACCESSFILE}.dat"
+ fi
+fi
+
+if test "$ADDRESS" != ""
+then
+ ADDRESS="-address=$ADDRESS"
+fi
+
+TCPDOPTS="$TCPDOPTS -user=$MAILUSER -group=$MAILGROUP $ADDRESS $BLACKLISTS
$ACCESSFILE -maxprocs=$MAXDAEMONS -maxperc=$MAXPERC -maxperip=$MAXPERIP
-pid=$PIDFILE"
+
+(
+ builtin echo prefix=${prefix}
+ builtin echo exec_prefix=${exec_prefix}
+ builtin echo sysconfdir=${sysconfdir}
+ builtin echo sbindir=${sbindir}
+
+ builtin echo set -a
+ for f in $configfiles
+ do
+ builtin echo . $f
+ done
+
+ builtin echo "ulimit -d $ULIMIT"
+ builtin echo ${sbindir}/couriertcpd $TCPDOPTS $PORT \
+ ${sbindir}/courieresmtpd'>/dev/null 2>&1 </dev/null'
+
+) | /bin/env -i /bin/sh
+exit 0
diff --git a/scripts/courier/courier-mta-ssl b/scripts/courier/courier-mta-ssl
new file mode 100755
index 0000000..377fe60
--- /dev/null
+++ b/scripts/courier/courier-mta-ssl
@@ -0,0 +1,73 @@
+#! /bin/sh
+#
+# $Id: esmtpd-ssl.in,v 1.7 2005/02/16 23:42:13 mrsam Exp $
+#
+# Copyright 1998 - 2005 Double Precision, Inc. See COPYING for
+# distribution information.
+#
+# This is a simple script to start/stop the smtp port daemon, courieresmtpd.
+#
+# Argument "start" starts the daemon.
+# Argument "stop" stops the daemon (just the listening daemon).
+# Argument "restart" rereads the smtpaccess.dat file.
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+
+. /etc/init.d/smgl_functions
+
+prefix="/usr"
+exec_prefix="/usr"
+sysconfdir="/etc/courier"
+sbindir="/usr/sbin"
+libexecdir="${exec_prefix}/libexec"
+
+. ${sysconfdir}/esmtpd
+. ${sysconfdir}/esmtpd-ssl
+
+export PATH
+export SHELL
+
+case $1 in
+start)
+ ;;
+stop)
+ ${sbindir}/couriertcpd -pid=$SSLPIDFILE -stop
+ exit 0
+ ;;
+restart)
+ ${sbindir}/couriertcpd -pid=$SSLPIDFILE -restart
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac
+
+cd ${prefix}
+
+if test "$ACCESSFILE" != ""
+then
+ if test ! -f "${ACCESSFILE}.dat"
+ then
+ ACCESSFILE=""
+ else
+ ACCESSFILE="-access=${ACCESSFILE}.dat"
+ fi
+fi
+
+ulimit -d "$ULIMIT"
+/bin/env -i /bin/sh -c " set -a ; . ${sysconfdir}/esmtpd ; \
+ . ${sysconfdir}/esmtpd-ssl ; \
+ ESMTP_TLS=1; export ESMTP_TLS; \
+ ${sbindir}/couriertcpd \
+ -stderrlogger=/usr/sbin/courierlogger \
+ -stderrloggername=esmtpd-ssl \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ -maxperc=$MAXPERC \
+ -pid=$SSLPIDFILE $TCPDOPTS \
+ -user=$MAILUSER -group=$MAILGROUP \
+ $BLACKLISTS $ACCESSFILE \
+ -address=$SSLADDRESS $SSLPORT \
+ $COURIERTLS -server -tcpd \
+ ${sbindir}/courieresmtpd"
diff --git a/scripts/courier/courier-pop b/scripts/courier/courier-pop
new file mode 100755
index 0000000..5784827
--- /dev/null
+++ b/scripts/courier/courier-pop
@@ -0,0 +1,78 @@
+#! /bin/sh
+# $Id: pop3d.in,v 1.19 2005/07/02 02:11:16 mrsam Exp $
+#
+# Copyright 1998 - 2005 Double Precision, Inc. See COPYING for
+# distribution information.
+#
+# Sample script to start Courier's pop3 daemon.
+#
+# This script should work for most systems. Authenticate via the PAM
library,
+# /etc/shadow, or fallback to /etc/passwd
+#
+# You must run this as root, and as a daemon process.
+#
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+
+. /etc/init.d/smgl_functions
+
+prefix="/usr"
+exec_prefix="/usr"
+sysconfdir="/etc/courier"
+sbindir="${exec_prefix}/sbin"
+bindir="/usr/bin"
+libexecdir="${exec_prefix}/libexec"
+
+if test ! -f ${sysconfdir}/pop3d
+then
+ echo "${sysconfdir}/pop3d does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+if test ! -f ${sysconfdir}/pop3d-ssl
+then
+ echo "${sysconfdir}/pop3d-ssl does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+. ${sysconfdir}/pop3d-ssl
+. ${sysconfdir}/pop3d
+
+export PATH
+export SHELL
+
+case "$1" in
+start)
+ ;;
+stop)
+ /usr/sbin/courierlogger -pid=$PIDFILE -stop
+ exit 0
+ ;;
+restart)
+ /usr/sbin/courierlogger -pid=$PIDFILE -restart
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac
+
+cd /usr
+
+/bin/env -i /bin/sh -c " set -a; \
+ prefix=/usr ; \
+ exec_prefix=/usr ; \
+ sbindir=${exec_prefix}/sbin ; \
+ bindir=/usr/bin ; \
+ libexecdir=${exec_prefix}/libexec ; \
+ . /etc/courier/pop3d ; \
+ . /etc/courier/pop3d-ssl ; \
+ TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
+ PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
+ /usr/sbin/courierlogger -pid=$PIDFILE -start $LOGGEROPTS \
+ ${exec_prefix}/sbin/couriertcpd -address=$ADDRESS \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ $TCPDOPTS \
+ $PORT ${exec_prefix}/libexec/courier/courierpop3login \
+ ${exec_prefix}/libexec/courier/courierpop3d
${MAILDIRPATH}"
diff --git a/scripts/courier/courier-pop-ssl b/scripts/courier/courier-pop-ssl
new file mode 100755
index 0000000..e471541
--- /dev/null
+++ b/scripts/courier/courier-pop-ssl
@@ -0,0 +1,65 @@
+#! /bin/sh
+# $Id: pop3d-ssl.in,v 1.16 2005/07/02 23:24:34 mrsam Exp $
+#
+# Copyright 1998 - 2005 Double Precision, Inc.
+# See COPYING for distribution information.
+
+
+RUNLEVEL=3
+NEEDS="+network +remotefs"
+
+. /etc/init.d/smgl_functions
+
+prefix=/usr
+exec_prefix=/usr
+libexecdir=${exec_prefix}/libexec
+sbindir=${exec_prefix}/sbin
+bindir="/usr/bin"
+sysconfdir="/etc/courier"
+
+if test ! -f ${sysconfdir}/pop3d
+then
+ echo "${sysconfdir}/pop3d does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+if test ! -f ${sysconfdir}/pop3d-ssl
+then
+ echo "${sysconfdir}/pop3d-ssl does not exist, forgot make
install-configure?"
+ exit 1
+fi
+
+. /etc/courier/pop3d
+. /etc/courier/pop3d-ssl
+
+case $1 in
+start)
+ exec /bin/env -i PATH="$PATH" SHELL="$SHELL" \
+ /bin/sh -c " set -a ; \
+ prefix=/usr ; \
+ exec_prefix=/usr ; \
+ sbindir=${exec_prefix}/sbin ; \
+ bindir=/usr/bin ; \
+ libexecdir=${exec_prefix}/libexec ; \
+ . /etc/courier/pop3d ; \
+ . /etc/courier/pop3d-ssl ; \
+ PROXY_HOSTNAME=$PROXY_HOSTNAME; \
+ POP3_TLS=1; \
+ POP3_STARTTLS=NO; \
+ POP3_TLS_REQUIRED=0; \
+ /usr/sbin/courierlogger -pid=$SSLPIDFILE -start
$SSLLOGGEROPTS \
+ ${exec_prefix}/sbin/couriertcpd -address=$SSLADDRESS \
+ -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
+ $TCPDOPTS \
+ $SSLPORT $COURIERTLS -server -tcpd \
+ $libexecdir/courier/courierpop3login \
+ $libexecdir/courier/courierpop3d
${MAILDIRPATH}"
+ ;;
+stop)
+ /usr/sbin/courierlogger -pid=$SSLPIDFILE -stop
+ ;;
+restart)
+ /usr/sbin/courierlogger -pid=$SSLPIDFILE -restart
+ ;;
+esac
+exit 0
diff --git a/scripts/cpqarrayd/cpqarray b/scripts/cpqarrayd/cpqarray
new file mode 100755
index 0000000..8b0c9f2
--- /dev/null
+++ b/scripts/cpqarrayd/cpqarray
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/cpqarrayd
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/cpufreqd/cpufreqd b/scripts/cpufreqd/cpufreqd
new file mode 100755
index 0000000..46a8b51
--- /dev/null
+++ b/scripts/cpufreqd/cpufreqd
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# Source Mage init.d install information
+# SMGL-script-version=20030606
+# SMGL-START:S:S25
+# SMGL-STOP:0 6:K65
+#
+# Startup script for the cpufreqd daemon. It's been made using the
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels AT cistron.nl>.
+# Modified for Debian GNU/Linux
+# by Ian Murdock <imurdock AT gnu.ai.mit.edu>.
+#
+# Version: @(#)skeleton 1.9.1 08-Apr-2002 miquels AT cistron.nl
+#
+
+PROGRAM=/usr/sbin/cpufreqd
+DESC="CPU Frequency daemon"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+required_executable $PROGRAM
+
+start()
+{
+ echo "Starting $DESC: $NAME"
+ loadproc $PROGRAM
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping $DESC: $NAME "
+ killproc $PROGRAM
+ evaluate_retval
+}
+
+status()
+{
+ statusproc $DAEMON
+}
+
+restart()
+{
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo "Restarting $DESC: $NAME"
+ stop
+ sleep 1
+ start
+}
+
diff --git a/scripts/cups-old/cups-old b/scripts/cups-old/cups-old
new file mode 100755
index 0000000..c35f34e
--- /dev/null
+++ b/scripts/cups-old/cups-old
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/cupsd
+RUNLEVEL=3
+if [ -x /usr/sbin/ptal-init ]; then
+ NEEDS="hpoj +network +remote_fs"
+elif [ -x /usr/sbin/hpiod ]; then
+ NEEDS="hplip +network +remote_fs"
+else
+ NEEDS="+network +remote_fs"
+fi
+
+. /etc/init.d/smgl_init
diff --git a/scripts/cups/cups b/scripts/cups/cups
new file mode 100755
index 0000000..c35f34e
--- /dev/null
+++ b/scripts/cups/cups
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/cupsd
+RUNLEVEL=3
+if [ -x /usr/sbin/ptal-init ]; then
+ NEEDS="hpoj +network +remote_fs"
+elif [ -x /usr/sbin/hpiod ]; then
+ NEEDS="hplip +network +remote_fs"
+else
+ NEEDS="+network +remote_fs"
+fi
+
+. /etc/init.d/smgl_init
diff --git a/scripts/cvsfs/smgl-cvsfsd b/scripts/cvsfs/smgl-cvsfsd
new file mode 100755
index 0000000..282f185
--- /dev/null
+++ b/scripts/cvsfs/smgl-cvsfsd
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/cvsfsd
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo -n "Starting cvs virtual filesystem daemon:"
+ if [ ! -d /proc/cvsfs ]; then
+ echo -n " kernel module"
+ /sbin/modprobe cvsfs
+ fi
+ echo " cvsfsd"
+ $PROGRAM &
+ pidof -x cvsfsd > /dev/null
+ evaluate_retval
+}
diff --git a/scripts/cyrus-imapd/cyrus-imapd b/scripts/cyrus-imapd/cyrus-imapd
new file mode 100755
index 0000000..35560cf
--- /dev/null
+++ b/scripts/cyrus-imapd/cyrus-imapd
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+PROGRAM=/usr/cyrus/bin/master
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/cyrus-master.pid
+
+. /etc/init.d/smgl_init
+
+start(){
+ echo -n "Starting cyrus-imapd..."
+ $PROGRAM &
+ while [ ! -e $PIDFILE ] && [ "$ITER" -lt 10 ] ; do sleep 1; echo -n .
;ITER=$((++ITER)); done
+ echo
+
+ if [ -e /var/run/cyrus-master.pid ]; then
+ ps -p `cat $PIDFILE` > /dev/null && evaluate_retval
+ else
+ print_status failure
+ exit 1
+ fi
+}
+
+stop(){
+ if test -s "$PIDFILE"
+ then
+ cyrus_pid=`cat $PIDFILE`
+ echo "Killing with pid $PIDFILE"
+ kill $cyrus_pid
+ rm $PIDFILE
+ else
+ echo "Cyrus-master pidfile not found. Possibly not running"
+ fi
+ evaluate_retval
+}
diff --git a/scripts/cyrus-sasl/saslauthd b/scripts/cyrus-sasl/saslauthd
new file mode 100644
index 0000000..45edab0
--- /dev/null
+++ b/scripts/cyrus-sasl/saslauthd
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+. /etc/sysconfig/saslauthd
+
+PROGRAM=/usr/sbin/saslauthd
+ARGS="-a $AUTH"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+if [ ! -d /var/run/saslauthd ]
+then
+ mkdir -p --mode=700 /var/run/saslauthd
+fi
+
+if [ ! -d /var/state/saslauthd ]
+then
+ mkdir -p --mode=700 /var/state/saslauthd
+fi
diff --git a/scripts/cyrus-sasl/saslauthd.conf
b/scripts/cyrus-sasl/saslauthd.conf
new file mode 100644
index 0000000..f4f0b04
--- /dev/null
+++ b/scripts/cyrus-sasl/saslauthd.conf
@@ -0,0 +1,2 @@
+# authentication mechanism to use
+AUTH=shadow
diff --git a/scripts/daemontools/svscan b/scripts/daemontools/svscan
new file mode 100644
index 0000000..f01f3d0
--- /dev/null
+++ b/scripts/daemontools/svscan
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# Note: svscan may be started and respawned directly from inittab.
+
+if [ -x "/command/svscan" ]; then
+ PROGRAM="/command/svscan"
+elif [ -x "/sbin/svscan" ]; then
+ PROGRAM="/sbin/svscan"
+else
+ error "svscan not found"
+fi
+
+if [ -d "/service" ]; then
+ ARGS="/service"
+elif [ -d "/etc/service" ]; then
+ ARGS="/etc/service"
+else
+ error "service directory not found"
+fi
+
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
+SUPERVISE_IN_INITTAB="`grep '^supervise:' /etc/inittab`"
+
+start()
+{
+ if [ -n "${SUPERVISE_IN_INITTAB}" ]; then
+ echo "svscan is being run from /etc/inittab."
+ else
+ _start
+ fi
+}
+
+stop_services()
+{
+ echo -n "Stopping supervised services... "
+ if [ `/bin/ls "${ARGS}" | wc -l` -gt 0 ]; then
+ echo
+ for SVC in "${ARGS}/"*; do
+ echo "Stopping $SVC..."
+ svc -dx "$SVC"
+ evaluate_retval
+ if [ -d "$SVC/log" ]; then
+ echo "Stopping $SVC/log..."
+ svc -dx "$SVC/log"
+ evaluate_retval
+ fi
+ done
+ else
+ echo "no services found."
+ fi
+}
+
+stop()
+{
+ stop_services
+
+ if [ -n "${SUPERVISE_IN_INITTAB}" ]; then
+ echo "svscan is being run from /etc/inittab and cannot be stopped."
+ else
+ _stop
+ fi
+}
+
+restart()
+{
+ if [ -n "${SUPERVISE_IN_INITTAB}" ]; then
+ stop_services
+ _stop
+ echo "svscan will be restarted by init."
+ else
+ _restart
+ fi
+}
+
+status()
+{
+ _status
+ if [ -n "${SUPERVISE_IN_INITTAB}" ]; then
+ echo "run from /etc/inittab."
+ else
+ echo "run standalone."
+ fi
+ svstat "${ARGS}/"*
+}
diff --git a/scripts/dansguardian/dansguardian
b/scripts/dansguardian/dansguardian
new file mode 100755
index 0000000..46096b9
--- /dev/null
+++ b/scripts/dansguardian/dansguardian
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/dansguardian
+RUNLEVEL=3
+NEEDS="+network squid"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting dansguardian..."
+ /usr/sbin/dansguardian > /dev/null 2>&1
+ evaluate_retval
+}
+
+reload()
+{
+ echo "Reloading dansguardian..."
+ /usr/sbin/dansguardian -r > /dev/null 2>&1
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping dansguardian..."
+ /usr/sbin/dansguardian -q > /dev/null 2>&1
+ evaluate_retval
+}
diff --git a/scripts/dante/danted b/scripts/dante/danted
new file mode 100755
index 0000000..06a2691
--- /dev/null
+++ b/scripts/dante/danted
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/socks5
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting danted..."
+ loadproc ${PROGRAM}
+}
+
+stop() {
+ echo "Stopping danted..."
+ killall socks5
+ loadproc true
+}
diff --git a/scripts/dbus/smgl-messagebus b/scripts/dbus/smgl-messagebus
new file mode 100755
index 0000000..073f159
--- /dev/null
+++ b/scripts/dbus/smgl-messagebus
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/dbus-daemon
+ARGS="--system"
+RUNLEVEL=3
+PIDFILE=/var/run/dbus/pid
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting system message bus..."
+ mkdir -p /var/run/dbus
+ if test ! -f $PIDFILE; then
+ # don't use loadproc here, as that fails if some user is running
+ # a session bus
+ $PROGRAM $ARGS
+ evaluate_retval
+ echo "Creating dbus machine uuid..."
+ /usr/bin/dbus-uuidgen --ensure
+ evaluate_retval
+ else
+ print_status warning "$PIDFILE exists, messagebus is running or has
crashed"
+ fi
+}
+
+stop() {
+ if [ ! -f $PIDFILE ]; then
+ echo "System message bus is not running"
+ return 0
+ fi
+ echo "Stopping system message bus..."
+ kill $(cat $PIDFILE)
+ if [ $? -eq 0 ]; then
+ rm -f $PIDFILE
+ fi
+ evaluate_retval
+}
+
+restart() {
+ echo "Restarting system message bus..."
+ if [ -f $PIDFILE ]; then
+ $0 stop
+ sleep 2
+ fi
+ $0 start
+}
+
+status() {
+ if [ ! -f $PIDFILE ]; then
+ echo "System message bus is not running"
+ return 0
+ fi
+ local pid=$(cat $PIDFILE)
+ if ps -p $pid > /dev/null; then
+ echo "System message bus is running with Process ID $pid"
+ else
+ echo "System message bus is not running, but $PIDFILE exists"
+ return 1
+ fi
+}
+
+reload() { exit 3; }
+force_reload() { exit 3; }
+
+usage() {
+ echo "Usage: $0 {start|stop|restart|status}"
+}
diff --git a/scripts/dcron/crond b/scripts/dcron/crond
new file mode 100644
index 0000000..bb6d439
--- /dev/null
+++ b/scripts/dcron/crond
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/crond
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/ddclient/ddclient b/scripts/ddclient/ddclient
new file mode 100644
index 0000000..a5c6aec
--- /dev/null
+++ b/scripts/ddclient/ddclient
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/ddclient
+ARGS="-daemon 300"
+NEEDS="+network +remote_fs"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/denyhosts/denyhosts b/scripts/denyhosts/denyhosts
new file mode 100644
index 0000000..e32ddb2
--- /dev/null
+++ b/scripts/denyhosts/denyhosts
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/denyhosts.py
+RUNLEVEL=3
+NEEDS="+remote_fs"
+DESC="DenyHosts daemon"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/denyhosts
+
+ARGS="$DENYHOSTS_EMAIL -c $DENYHOSTS_CONFIG --daemon"
+
+start()
+{
+ echo "Starting $DESC: $NAME"
+ loadproc $PROGRAM $ARGS
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping $DESC: $NAME "
+ killproc $PROGRAM
+ evaluate_retval
+}
+
+status()
+{
+ statusproc $PROGRAM
+}
+
+restart()
+{
+ echo "Restarting $DESC: $NAME"
+ stop
+ sleep 1
+ start
+}
+
diff --git a/scripts/denyhosts/denyhosts.conf
b/scripts/denyhosts/denyhosts.conf
new file mode 100644
index 0000000..5b3eee4
--- /dev/null
+++ b/scripts/denyhosts/denyhosts.conf
@@ -0,0 +1,14 @@
+#
+# Configuration file for denyhosts
+#
+
+#
+# Do not send an email report
+#
+#DENYHOSTS_EMAIL="--noemail"
+
+#
+# Location of config file
+#
+DENYHOSTS_CONFIG="/etc/denyhosts.cfg"
+
diff --git a/scripts/dermixd/dermixd b/scripts/dermixd/dermixd
new file mode 100644
index 0000000..9e88af9
--- /dev/null
+++ b/scripts/dermixd/dermixd
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/dermixd
+RUNLEVEL=3
+
+CONTROL=/usr/bin/dermixd-control
+#some defaults... ok, dermixd should start to read a config file...
+PORT=8888
+BUFFER=2048
+AUDIO_RATE=44100
+CHANNELS=2
+DEBUG_OUT=
+DEFAULT_OUTPUT=
+DEFAULT_OUTFILE=
+MPG123_DECODER=/usr/bin/mpg123
+MPG123_PREBUFFER=2
+MPG123_ZEROSCAN=yes
+MPG123_ZEROLEVEL=100
+MPG123_GAPLESS=no
+INITIAL_SETUP=yes
+OUTPUT_STOPPED=yes
+NICE=-5
+#be on the safe side
+USER=nobody
+REMOTE=no
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/dermixd
+
+start()
+{
+ echo "starting DerMixD..."
+ COMMAND="$PROGRAM port='$PORT' buffer='$BUFFER'
audio_rate='$AUDIO_RATE' channels='$CHANNELS'
mpg123.decoder='$MPG123_DECODER' mpg123.prebuffer='$MPG123_PREBUFFER'
mpg123.zeroscan='$MPG123_ZEROSCAN' mpg123.gapless=$MPG123_GAPLESS"
+ if ! test -z "$DEBUG_OUT"; then COMMAND="$COMMAND
output='$DEBUG_OUT'"; fi
+ if [[ "$REMOTE" == "yes" ]]; then COMMAND="$COMMAND -r"; fi
+ if [[ "$INITIAL_SETUP" == "yes" ]]
+ then
+ if ! test -z "$DEFAULT_OUTPUT"; then COMMAND="$COMMAND
default_output='$DEFAULT_OUTPUT'"; fi
+ if ! test -z "$DEFAULT_OUTFILE"; then COMMAND="$COMMAND
default_outfile='$DEFAULT_OUTFILE'"; fi
+ else
+ COMMAND="$COMMAND -n"
+ fi
+ nice -n $NICE su -s /bin/bash -c "${COMMAND}" ${USER} &&
+ if [[ "$INITIAL_SETUP" == "yes" ]] && [[ "$OUTPUT_STOPPED" == "yes" ]]
+ then
+ $CONTROL outstop 0
+ fi
+}
+
+stop()
+{
+ echo "stopping daemon politely"
+ $CONTROL --port=${PORT} shutdown
+}
+
+status()
+{
+ echo "status:"
+ $CONTROL --port=${PORT} fullstat
+}
diff --git a/scripts/dermixd/dermixd.conf b/scripts/dermixd/dermixd.conf
new file mode 100644
index 0000000..4d5ce6b
--- /dev/null
+++ b/scripts/dermixd/dermixd.conf
@@ -0,0 +1,59 @@
+# configuration for dermixd init script
+
+# user to start daemon as
+# This user should be able to open audio hardware and read your music files,
+# but not more! Anyone can send commands per TCP!
+USER=musicdaemon
+
+# port to bind to
+PORT=8888
+
+# allow non-local connections? yes/no
+# Trust your network if enabling that!
+REMOTE=no
+
+# mixing and output buffer size in samples
+BUFFER=2048
+
+# mixing and output samplerate (inputs of different rate are converted)
+AUDIO_RATE=44100
+
+# number of mixing/output channels (1 or 2)
+CHANNELS=2
+
+# nice value to change process priority... you want continuous audio, don't
you?
+NICE=-5
+
+# configuration of the mpeg input
+
+# path to mpg123 decoder binary
+MPG123_DECODER=/usr/bin/mpg123
+
+# use mpg123's own gapless support?
+MPG123_GAPLESS=no
+
+# skip zero level at beginning and end of tracks to get gapless output?
yes/no
+MPG123_ZEROSCAN=yes
+
+# size of mpg123 prebuffer in seconds
+MPG123_PREBUFFER=2
+
+# less that that is zero
+# (talking 16 bit audio, that means we have a range of 0 to 32767)
+MPG123_ZEROLEVEL=100
+
+# do create an initial setup of two input channels and one output channel?
yes/no
+INITIAL_SETUP=yes
+
+# default output device and file (resource) to use
+# leaving blank uses builtin default
+DEFAULT_OUTPUT=
+DEFAULT_OUTFILE=
+
+# stop the initially created output so that audio device is not blocked?
yes/no
+# (in case your audio device doesn't support being opened multiple times)
+OUTPUT_STOPPED=yes
+
+# a file to send all stuff to that dermixd may print out
+# (normally directly to /dev/null ;-)
+#DEBUG_OUT=
diff --git a/scripts/deskopt/deskopt b/scripts/deskopt/deskopt
new file mode 100644
index 0000000..53d9a35
--- /dev/null
+++ b/scripts/deskopt/deskopt
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/deskopt
+ARGS="-c /etc/deskopt/deskopt.conf"
+RUNLEVEL=1
+
+. /etc/init.d/smgl_init
+
+stop() {
+ echo "Stopping $NAME..."
+ $PROGRAM -q
+}
diff --git a/scripts/devfsd/devfsd b/scripts/devfsd/devfsd
new file mode 100644
index 0000000..168d7d1
--- /dev/null
+++ b/scripts/devfsd/devfsd
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/sbin/devfsd
+ARGS="/dev"
+RUNLEVEL=DEV
+REQUIRED=yes
+
+. /etc/init.d/smgl_init
diff --git a/scripts/dhcdbd/dhcdbd b/scripts/dhcdbd/dhcdbd
new file mode 100644
index 0000000..d5b9108
--- /dev/null
+++ b/scripts/dhcdbd/dhcdbd
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# Modified from dhcdbd's RedHat/dhcdbd.init file
+#
+
+
+PROGRAM=/sbin/dhcdbd
+RUNLEVEL=3
+NEEDS="smgl-messagebus"
+ARGS="--system"
+PIDFILE=/var/run/dhcdbd.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting dhcdbd..."
+ $PROGRAM $ARGS
+ mkdir -p /var/lock/subsys
+ [ $(evaluate_retval) -eq 0 && touch /var/lock/subsys/dhcdbd
+}
+
+stop()
+{
+ echo "Stopping dhcdbd..."
+ if [ -e /var/lock/subsys/dhcdbd ] &&
+ [ -e /var/run/dbus/system_bus_socket ]; then
+ /usr/bin/dbus-send --system \
+ --dest=com.redhat.dhcp \
+ --type=method_call \
+ --print-reply \
+ --reply-timeout=20000 \
+ /com/redhat/dhcp \
+ com.redhat.dhcp.quit >/dev/null 2>&1
+ evaluate_retval
+ else
+ killproc dhcdbd -TERM
+ evaluate_retval
+ fi
+
+ rm -f /var/lock/subsys/dhcdbd
+}
+
+status()
+{
+ pid=$(cat $PIDFILE)
+ if [ "$(evaluate_retval)" -eq 0 ] && [ -n "$pid" ]; then
+ sender=`/usr/bin/dbus-send --system \
+ --dest=com.redhat.dhcp \
+ --type=method_call \
+ --print-reply \
+ --reply-timeout=20000 \
+ /com/redhat/dhcp \
+ com.redhat.dhcp.ping |
+ grep 'sender=' | sed 's/^.*sender=//;s/\ .*$//'`
+ if [ "$(evaluate_retval)" -eq 0 ]; then
+ echo "dhcdbd ( $pid ) listening on $sender"
+ fi
+ fi
+}
+
diff --git a/scripts/dhcp/dhcp b/scripts/dhcp/dhcp
new file mode 100644
index 0000000..0890691
--- /dev/null
+++ b/scripts/dhcp/dhcp
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. /etc/sysconfig/dhcp
+
+RUNLEVEL=3
+PROGRAM=/usr/sbin/dhcpd
+ARGS="$DEVICE"
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+if [ ! -f /var/state/dhcp/dhcpd.leases ] ; then
+ touch /var/state/dhcp/dhcpd.leases
+fi
diff --git a/scripts/dhcp/dhcp.conf b/scripts/dhcp/dhcp.conf
new file mode 100644
index 0000000..61a2b07
--- /dev/null
+++ b/scripts/dhcp/dhcp.conf
@@ -0,0 +1,3 @@
+# Device which you want the DHCP server to listen on
+# Leave blank if you want to listen on all devices
+DEVICE=eth1
diff --git a/scripts/dictd/dictd b/scripts/dictd/dictd
new file mode 100644
index 0000000..75f2ed9
--- /dev/null
+++ b/scripts/dictd/dictd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/dictd
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/distcc/distcc b/scripts/distcc/distcc
new file mode 100755
index 0000000..0e071b0
--- /dev/null
+++ b/scripts/distcc/distcc
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/distcc
+
+PROGRAM=/usr/bin/distccd
+ARGS="--user $USER --allow $ALLOWED --daemon --log-file $LOGFILE --log-level
$LOGLEVEL --listen $LISTEN --jobs $JOBS"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/distcc/distcc.conf b/scripts/distcc/distcc.conf
new file mode 100644
index 0000000..30756fc
--- /dev/null
+++ b/scripts/distcc/distcc.conf
@@ -0,0 +1,6 @@
+USER="distcc"
+ALLOWED="0.0.0.0/24"
+LOGFILE="/var/log/distcc"
+LOGLEVEL="info"
+LISTEN="0.0.0.0"
+JOBS="3"
diff --git a/scripts/dnsmasq/dnsmasq b/scripts/dnsmasq/dnsmasq
new file mode 100644
index 0000000..8dd69c1
--- /dev/null
+++ b/scripts/dnsmasq/dnsmasq
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM="/usr/sbin/dnsmasq"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/dovecot/smgl-dovecot b/scripts/dovecot/smgl-dovecot
new file mode 100644
index 0000000..7287ab7
--- /dev/null
+++ b/scripts/dovecot/smgl-dovecot
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/dovecot
+ARGS="-c /etc/dovecot.conf"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/drac/drac b/scripts/drac/drac
new file mode 100755
index 0000000..a1f293f
--- /dev/null
+++ b/scripts/drac/drac
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+mta"
+#ARGS=" -bd -q30m"
+PROGRAM="/usr/sbin/rpc.dracd"
+
+. /etc/init.d/smgl_init
+
+
+##!/bin/sh
+#
+#case $1 in
+# start|restart) echo -n "$1ing rpc.dracd daemon: "
+# pkill "^rpc.dracd$" && sleep 5
+# rpc.dracd &
+# ;;
+#
+# stop) echo -n "$1ing rpc.dracd daemon: "
+# pkill "^rpc.dracd$"
+# ;;
+#
+# *) echo "Usage: dracd {start|stop|restart}"
+# exit 1
+# ;;
+#esac
diff --git a/scripts/dropbear/dropbear b/scripts/dropbear/dropbear
new file mode 100755
index 0000000..f21fe72
--- /dev/null
+++ b/scripts/dropbear/dropbear
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/dropbear
+ARGS=""
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/dspam/dspam b/scripts/dspam/dspam
new file mode 100755
index 0000000..31fbeed
--- /dev/null
+++ b/scripts/dspam/dspam
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+PROGRAM="/bin/true"
+NAME="dspam"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+PIDFILE=/var/run/dspam.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting dspam..."
+ /usr/bin/dspam --daemon &
+ ps -C dspam > /dev/null
+ evaluate_retval
+}
+
+stop()
+{
+ echo "stopping dspam..."
+ kill $(cat ${PIDFILE})
+ evaluate_retval
+}
diff --git a/scripts/entrance/entrance b/scripts/entrance/entrance
new file mode 100755
index 0000000..aee963e
--- /dev/null
+++ b/scripts/entrance/entrance
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+
+PROGRAM=/usr/sbin/entranced
+RUNLEVEL=5
+PROVIDES=display_manager
+
+. /etc/init.d/smgl_init
diff --git a/scripts/esehttpd/esehttpd b/scripts/esehttpd/esehttpd
new file mode 100644
index 0000000..f147c91
--- /dev/null
+++ b/scripts/esehttpd/esehttpd
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/esehttpd
+ARGS="-f /etc/esehttpd/esehttpd.conf -l /var/log/esehttpd/error_log"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/exalt-daemon/exaltd b/scripts/exalt-daemon/exaltd
new file mode 100755
index 0000000..39bc16a
--- /dev/null
+++ b/scripts/exalt-daemon/exaltd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/exalt-daemon
+RUNLEVEL=3
+NEEDS="smgl-messagebus hald"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/exim/exim b/scripts/exim/exim
new file mode 100644
index 0000000..3bcb41b
--- /dev/null
+++ b/scripts/exim/exim
@@ -0,0 +1,12 @@
+#!/bin/bash
+PROGRAM=/usr/sbin/exim
+RUNLEVEL=3
+NEEDS="+network"
+
+#
+# /etc/sysconfig/exim needs to be sourced before ARGS
+#
+. /etc/sysconfig/exim
+. /etc/init.d/smgl_init
+
+ARGS="-bd -q${QUEUE_DELAY}"
diff --git a/scripts/exim/exim.conf b/scripts/exim/exim.conf
new file mode 100644
index 0000000..9d298d0
--- /dev/null
+++ b/scripts/exim/exim.conf
@@ -0,0 +1,10 @@
+#
+# Configuration file for exim's init.d script
+#
+
+#
+# Accumulated message queue process time
+# e.g. every 15 minutes
+#
+QUEUE_DELAY=15m
+
diff --git a/scripts/fail2ban/fail2ban b/scripts/fail2ban/fail2ban
new file mode 100755
index 0000000..5f2a910
--- /dev/null
+++ b/scripts/fail2ban/fail2ban
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/fail2ban-client
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting Fail2Ban"
+ $PROGRAM start > /dev/null 2>&1
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping Fail2Ban"
+ $PROGRAM stop > /dev/null 2>&1
+ evaluate_retval
+}
+
+status() {
+ echo "Checking Fail2Ban status"
+ $PROGRAM status > /dev/null 2>&1
+ evaluate_retval
+}
+
+reload() {
+ echo "Reloading Fail2Ban configuration"
+ $PROGRAM reload > /dev/null 2>&1
+ evaluate_retval
+}
+
+usage()
+{
+ echo "Usage: $0 {start|stop|restart|status|reload}"
+}
diff --git a/scripts/fam/smgl-fam b/scripts/fam/smgl-fam
new file mode 100755
index 0000000..365915d
--- /dev/null
+++ b/scripts/fam/smgl-fam
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/famd
+RUNLEVEL=3
+NEEDS="+local_fs +remote_fs +portmap"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/farmerjoe/farmerjoe-appserver
b/scripts/farmerjoe/farmerjoe-appserver
new file mode 100644
index 0000000..842e675
--- /dev/null
+++ b/scripts/farmerjoe/farmerjoe-appserver
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/farmerjoe
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/sysconfig/farmerjoe-appserver
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Farmerjoe Appserver..."
+ su -c "$PROGRAM --appserver >> ${LOG_FILE} 2>&1" $USER &
+ evaluate_retval
+ echo $(ps aux|grep farmerjoe|grep -- "--appserver"|awk '{print $2}')
> /var/run/farmerjoe-appserver.pid
+}
+
+stop()
+{
+ echo "Stopping Farmerjoe Appserver..."
+ if [[ -e /var/run/farmerjoe-appserver.pid ]]
+ then
+ kill $(cat /var/run/farmerjoe-appserver.pid)
+ evaluate_retval
+ rm -f /var/run/farmerjoe-appserver.pid
+ else
+ echo "Farmerjoe Appserver is not running"
+ fi
+}
+
+status()
+{
+ if [[ -e /var/run/farmerjoe-appserver.pid ]]
+ then
+ echo "Farmerjoe Appserver is running as $(cat
/var/run/farmerjoe-appserver.pid)"
+ else
+ echo "Farmerjoe Appserver is not running"
+ fi
+}
+
diff --git a/scripts/farmerjoe/farmerjoe-appserver.conf
b/scripts/farmerjoe/farmerjoe-appserver.conf
new file mode 100644
index 0000000..f9a7897
--- /dev/null
+++ b/scripts/farmerjoe/farmerjoe-appserver.conf
@@ -0,0 +1,10 @@
+#
+# Location of init logs
+#
+LOG_FILE=/var/log/farmerjoe-appserver.log
+
+#
+# User to run farmerjoe as
+#
+USER=root
+
diff --git a/scripts/farmerjoe/farmerjoe-master
b/scripts/farmerjoe/farmerjoe-master
new file mode 100644
index 0000000..d8d22df
--- /dev/null
+++ b/scripts/farmerjoe/farmerjoe-master
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/farmerjoe
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/sysconfig/farmerjoe-master
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Farmerjoe Master..."
+ su -c "$PROGRAM --master >> ${LOG_FILE} 2>&1" $USER &
+ evaluate_retval
+ echo $(ps aux|grep farmerjoe|grep -- "--master"|awk '{print $2}') >
/var/run/farmerjoe-master.pid
+}
+
+stop()
+{
+ echo "Stopping Farmerjoe Master..."
+ if [[ -e /var/run/farmerjoe-master.pid ]]
+ then
+ kill $(cat /var/run/farmerjoe-master.pid)
+ evaluate_retval
+ rm -f /var/run/farmerjoe-master.pid
+ else
+ echo "Farmerjoe Master is not running"
+ fi
+}
+
+status()
+{
+ if [[ -e /var/run/farmerjoe-master.pid ]]
+ then
+ echo "Farmerjoe Master is running as $(cat
/var/run/farmerjoe-master.pid)"
+ else
+ echo "Farmerjoe Master is not running"
+ fi
+}
+
diff --git a/scripts/farmerjoe/farmerjoe-master.conf
b/scripts/farmerjoe/farmerjoe-master.conf
new file mode 100644
index 0000000..aa83897
--- /dev/null
+++ b/scripts/farmerjoe/farmerjoe-master.conf
@@ -0,0 +1,10 @@
+#
+# Location of init logs
+#
+LOG_FILE=/var/log/farmerjoe-master.log
+
+#
+# User to run farmerjoe as
+#
+USER=root
+
diff --git a/scripts/farmerjoe/farmerjoe-slave
b/scripts/farmerjoe/farmerjoe-slave
new file mode 100644
index 0000000..a62f511
--- /dev/null
+++ b/scripts/farmerjoe/farmerjoe-slave
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/farmerjoe
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/sysconfig/farmerjoe-slave
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Farmerjoe Slave..."
+ su -c "$PROGRAM >> ${LOG_FILE} 2>&1" $USER &
+ evaluate_retval
+ echo $(ps aux|grep farmerjoe$|awk '{print $2}') >
/var/run/farmerjoe-slave.pid
+}
+
+stop()
+{
+ echo "Stopping Farmerjoe Slave..."
+ if [[ -e /var/run/farmerjoe-slave.pid ]]
+ then
+ kill $(cat /var/run/farmerjoe-slave.pid)
+ evaluate_retval
+ rm -f /var/run/farmerjoe-slave.pid
+ else
+ echo "Farmerjoe Slave is not running"
+ fi
+}
+
+status()
+{
+ if [[ -e /var/run/farmerjoe-slave.pid ]]
+ then
+ echo "Farmerjoe Slave is running as $(cat
/var/run/farmerjoe-slave.pid)"
+ else
+ echo "Farmerjoe Slave is not running"
+ fi
+}
+
diff --git a/scripts/farmerjoe/farmerjoe-slave.conf
b/scripts/farmerjoe/farmerjoe-slave.conf
new file mode 100644
index 0000000..8ed51ac
--- /dev/null
+++ b/scripts/farmerjoe/farmerjoe-slave.conf
@@ -0,0 +1,10 @@
+#
+# Location of init logs
+#
+LOG_FILE=/var/log/farmerjoe-slave.log
+
+#
+# User to run farmerjoe as
+#
+USER=root
+
diff --git a/scripts/fcron/fcron b/scripts/fcron/fcron
new file mode 100755
index 0000000..0f60e1a
--- /dev/null
+++ b/scripts/fcron/fcron
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/fcron
+ARGS="-b"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/ferm/ferm b/scripts/ferm/ferm
new file mode 100755
index 0000000..0a99fd1
--- /dev/null
+++ b/scripts/ferm/ferm
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/ferm
+RUNLEVEL=3
+ARGS="/etc/sysconfig/ferm"
+NEEDS="+network"
+
+[ ! -e /proc/net/ip_tables_names ] && /sbin/modprobe ip_tables
+
+. /etc/init.d/smgl_init
+
+stop() {
+ echo "Flushing $NAME rules..."
+ ferm -F $ARGS
+ evaluate_retval
+}
+
+usage() {
+ echo "Usage: $0 {start|stop|restart}"
+}
diff --git a/scripts/ferm/ferm.conf b/scripts/ferm/ferm.conf
new file mode 100644
index 0000000..5ea86dd
--- /dev/null
+++ b/scripts/ferm/ferm.conf
@@ -0,0 +1,10 @@
+# Ferm example script
+#
+# for more info how to configure it -- read ferm(1) and import-ferm(1)
+#
+
+table filter {
+ chain INPUT policy ACCEPT;
+ chain OUTPUT policy ACCEPT;
+ chain FORWARD policy DROP;
+}
diff --git a/scripts/firebird/firebird2 b/scripts/firebird/firebird2
new file mode 100755
index 0000000..d097fe3
--- /dev/null
+++ b/scripts/firebird/firebird2
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# description: Start/Stop firebird2 database server
+#
+# This file belongs in /etc/init.d where it will be run
+# on system startup and shutdown to start the background
+# Firebird2 database Super server daemon
+
+FB_DIR=/opt/firebird/bin
+FB=fbserver
+# as of rc2, preferred method of stopping is to kill the process
+
+source /etc/init.d/smgl_functions
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+case $1 in
+ start)
+ echo "Starting Firebird Super Server"
+ su -s "/bin/sh" -m -c "$FB_DIR/$FB" -l "firebird" &
+ evaluate_retval
+ ;;
+ stop)
+ echo "Stopping Firebird server"
+ kill `ps -u firebird`
+ evaluate_retval
+ ;;
+
+ restart)
+ echo "Restarting Firebird server"
+ $0 stop
+ $0 start
+ evaluate_retval
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
diff --git a/scripts/fnfx/fnfxd b/scripts/fnfx/fnfxd
new file mode 100755
index 0000000..6cf81c0
--- /dev/null
+++ b/scripts/fnfx/fnfxd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/fnfxd
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/freeradius/radiusd b/scripts/freeradius/radiusd
new file mode 100755
index 0000000..54de9b5
--- /dev/null
+++ b/scripts/freeradius/radiusd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/radiusd
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/freewnn/jserver b/scripts/freewnn/jserver
new file mode 100755
index 0000000..bc1a58d
--- /dev/null
+++ b/scripts/freewnn/jserver
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+PROGRAM="/usr/bin/Wnn4/jserver"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting jserver..."
+ /usr/bin/Wnn4/jserver 2>&1>/dev/null
+}
+
+stop () {
+ echo "Stopping jserver..."
+ /usr/bin/Wnn4/wnnkill 2>&1>/dev/null
+}
diff --git a/scripts/fwknop/fwknopd b/scripts/fwknop/fwknopd
new file mode 100644
index 0000000..3b135ad
--- /dev/null
+++ b/scripts/fwknop/fwknopd
@@ -0,0 +1,24 @@
+PROGRAM=/usr/sbin/fwknopd
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting the fwknop daemons..."
+ /usr/sbin/fwknopd
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping the fwknop daemons..."
+ /usr/sbin/fwknopd --Kill
+ evaluate_retval
+}
+
+status()
+{
+ /usr/sbin/fwknopd --Status
+}
diff --git a/scripts/g15daemon/g15daemon b/scripts/g15daemon/g15daemon
new file mode 100755
index 0000000..b0972cb
--- /dev/null
+++ b/scripts/g15daemon/g15daemon
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/g15daemon
+ARGS=""
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting daemon..."
+ $PROGRAM
+}
+
+stop()
+{
+ echo "Stopping daemon..."
+ $PROGRAM -k
+}
+
+restart()
+{
+ echo "Restarting daemon..."
+ $PROGRAM -k
+ sleep 1
+ $PROGRAM
+}
+
+status()
+{
+ $PROGRAM --version
+}
diff --git a/scripts/gdm/gdm b/scripts/gdm/gdm
new file mode 100755
index 0000000..c6be4b6
--- /dev/null
+++ b/scripts/gdm/gdm
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# gdm.sh Load the GDM login manager at boot
+#
+# Written for Source Mage GNU/Linux
+#
+# Version: @(#)gdm.sh 1.0.0 2002-10-02 Eric Sandall
<sandalle AT sourcemage.org>
+# Version: @(#)gdm.sh 1.0.1 2003-03-28 Eric Sandall
<sandalle AT sourcemage.org>
+# Now properly kills all instances of gdm (since they are not just named
gdm)
+#
+
+RUNLEVEL=5
+PROVIDES=display_manager
+
+. /etc/init.d/smgl_init
+
+case $1 in
+ start) echo "$1ing gdm"
+ gdm
+ evaluate_retval
+ ;;
+
+ stop) echo "$1ping gdm"
+ pkill "^gdm*"
+ evaluate_retval
+ ;;
+
+ restart) stop $0 &&
+ start $0
+ ;;
+
+ *) echo "Usage: $0 {start|stop|restart}"
+ ;;
+esac
diff --git a/scripts/gdm/gdm.sh b/scripts/gdm/gdm.sh
new file mode 100755
index 0000000..3ad20b3
--- /dev/null
+++ b/scripts/gdm/gdm.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# gdm.sh Load the GDM login manager at boot
+#
+# Written for Source Mage GNU/Linux
+#
+# Version: @(#)gdm.sh 1.0.0 2002-10-02 Eric Sandall
<sandalle AT sourcemage.org>
+# Version: @(#)gdm.sh 1.0.1 2003-03-28 Eric Sandall
<sandalle AT sourcemage.org>
+# Now properly kills all instances of gdm (since they are not just named
gdm)
+#
+
+case $1 in
+ start) echo "$1ing gdm"
+ gdm
+ ;;
+
+ stop) echo "$1ping gdm"
+ pkill "^gdm*"
+ ;;
+
+ restart) stop $0 &&
+ start $0
+ ;;
+
+ *) echo "Usage: $0 {start|stop|restart}"
+ ;;
+esac
diff --git a/scripts/gdm2/gdm b/scripts/gdm2/gdm
new file mode 100755
index 0000000..d3cc6c7
--- /dev/null
+++ b/scripts/gdm2/gdm
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/gdm
+RUNLEVEL=5
+PROVIDES=display_manager
+
+. /etc/init.d/smgl_init
+
+stop() {
+ if [ -f /var/run/gdm.pid ]; then
+ kill `cat /var/run/gdm.pid`
+ fi
+ evaluate_retval
+}
+
+status() {
+ if [ -f /var/run/gdm.pid ]; then
+ if ps -p `cat /var/run/gdm.pid` > /dev/null; then
+ echo "gdm is running with Process ID $(cat /var/run/gdm.pid)"
+ else
+ echo "gdm is not running but /var/run/gdm.pid exists"
+ return 1
+ fi
+ else
+ echo "gdm is not running"
+ fi
+}
diff --git a/scripts/git/git-daemon b/scripts/git/git-daemon
new file mode 100755
index 0000000..0cf40c5
--- /dev/null
+++ b/scripts/git/git-daemon
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+. /etc/sysconfig/git-daemon
+
+PIDFILE=/var/run/git-daemon.pid
+PROGRAM=/usr/bin/git
+RUNLEVEL=3
+NEEDS="+network"
+ARGS="daemon --detach --reuseaddr --pid-file=${PIDFILE} ${EXTRA_ARGS}"
+
+[[ -z ${TIMEOUT} ]] || ARGS="${ARGS} --timeout=${TIMEOUT}"
+[[ -z ${INIT_TIMEOUT} ]] || ARGS="${ARGS} --init-timeout=${INIT_TIMEOUT}"
+[[ -z ${PORT} ]] || ARGS="${ARGS} --port=${PORT}"
+[[ -z ${USER} ]] || ARGS="${ARGS} --user=${USER}"
+[[ -z ${GROUP} ]] || ARGS="${ARGS} --group=${GROUP}"
+[[ -z ${STRICT_PATHS} ]] || ARGS="${ARGS} --strict-paths"
+[[ -z ${BASE_PATH} ]] || ARGS="${ARGS} --base-path=${BASE_PATH}"
+
+if [[ -z ${LOG_FILE} ]]; then
+ ARGS="${ARGS} --syslog"
+fi
+
+if [[ -z ${EXPORTED_DIRECTORIES} ]]; then
+ ARGS="${ARGS} --export-all"
+else
+ ARGS="${ARGS} ${EXPORTED_DIRECTORIES}"
+fi
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting ${NAME}..."
+ loadproc ${PROGRAM} ${ARGS}
+}
+
+stop()
+{
+ echo "Stopping ${NAME}..."
+ killproc ${PROGRAM/git/git-daemon}
+}
+
+status()
+{
+ statusproc ${PROGRAM/git/git-daemon}
+}
+
+reload()
+{
+ echo "Reloading ${NAME}..."
+ reloadproc ${PROGRAM/git/git-daemon}
+}
diff --git a/scripts/git/git-daemon.conf b/scripts/git/git-daemon.conf
new file mode 100644
index 0000000..8264530
--- /dev/null
+++ b/scripts/git/git-daemon.conf
@@ -0,0 +1,54 @@
+# Extra arguments like `--verbose' or `--syslog'
+EXTRA_ARGS="--verbose"
+
+# Timeout Value
+# Timeout for specific client sub-requests. This includes the time
+# it takes for the server to process the sub-request and time
+# spent waiting for next client's request.
+TIMEOUT="30"
+
+# Init Timeout
+# Timeout between the moment the connection is established and the
+# client request is received (typically a rather low value, since
+# that should be basically immediate).
+INIT_TIMEOUT="1"
+
+# Port
+# Port to listen on
+PORT="9418"
+
+# Alternative User
+# User to run git-daemon as
+USER="root"
+
+# Alternative Group
+# Group to run git-daemon as
+GROUP=""
+
+# Strict Paths
+# Match paths exactly (i.e. don't allow "/foo/repo" when the real
+# path is "/foo/repo.git" or "/foo/repo/.git") and don't do
+# user-relative paths. git-daemon will refuse to start when this
+# option is enabled and no whitelist is specified. Set to anything
+# to enable this option.
+STRICT_PATHS=""
+
+# Base Path
+# Remap all the path requests as relative to the given path. This
+# is sort of "GIT root" - if you run git-daemon with
+# --base-path=/srv/git on example.com, then if you later try to
+# pull git://example.com/hello.git, git-daemon will interpret the
+# path as /srv/git/hello.git.
+BASE_PATH="/"
+
+# Exported Directories
+# A directory to add to the whitelist of allowed directories.
+# Unless --strict-paths is specified this will also include
+# subdirectories of each named directory. Leave blank to
+# export all directories.
+EXPORTED_DIRECTORIES=""
+
+# Log File
+# Log where all output of the git-daemon is logged to. Defaults to
+# /var/log/git-daemon.log. Syslog is used when this variable is empty
+LOG_FILE=""
diff --git a/scripts/gkrellm2/gkrellmd b/scripts/gkrellm2/gkrellmd
new file mode 100755
index 0000000..652f65e
--- /dev/null
+++ b/scripts/gkrellm2/gkrellmd
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PROGRAM=/usr/bin/gkrellmd
+ARGS="-d"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/gkrellmd
+
diff --git a/scripts/gkrellm2/gkrellmd.conf b/scripts/gkrellm2/gkrellmd.conf
new file mode 100644
index 0000000..0ffdd14
--- /dev/null
+++ b/scripts/gkrellm2/gkrellmd.conf
@@ -0,0 +1,13 @@
+#--------------------------------------------------------------------
+## -m, --max-clients N Number of simultaneous clients
+## -P, --port P Server port to listen on
+## -a, --allow-host host Allow connections from specified hosts
+## -c, --clear-hosts Clears the current list of allowed hosts
+## --io-timeout N Close connection after N seconds of no I/O
+## --reconnect-timeout N Try to connect every N seconds after a disconnect
+## --mailbox path Send local mailbox counts to gkrellm clients.
+## -d, --detach Run in background and detach from terminal
+## -U, --user username Change to this username after startup
+## -G, --group groupname Change to this group after startup
+#--------------------------------------------------------------------
+ARGS="${ARGS}"
diff --git a/scripts/gnump3d/gnump3d b/scripts/gnump3d/gnump3d
new file mode 100755
index 0000000..8391752
--- /dev/null
+++ b/scripts/gnump3d/gnump3d
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+
+PROGRAM=/usr/bin/gnump3d
+ARGS="--background"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/gnustep-base/gdomap b/scripts/gnustep-base/gdomap
new file mode 100755
index 0000000..eeb4213
--- /dev/null
+++ b/scripts/gnustep-base/gdomap
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM="/usr/bin/gdomap"
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/gpm/gpm b/scripts/gpm/gpm
new file mode 100755
index 0000000..e8a4c4c
--- /dev/null
+++ b/scripts/gpm/gpm
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/gpm
+
+PROGRAM=/usr/sbin/gpm
+ARGS="-m $DEV -t $MOUSE"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/gpm/gpm.conf b/scripts/gpm/gpm.conf
new file mode 100644
index 0000000..8023261
--- /dev/null
+++ b/scripts/gpm/gpm.conf
@@ -0,0 +1,5 @@
+# mouse type
+MOUSE=MTYPE
+
+# mouse device
+DEV=MDEV
diff --git a/scripts/gpm/smgl-suspend-gpm b/scripts/gpm/smgl-suspend-gpm
new file mode 100755
index 0000000..aba9108
--- /dev/null
+++ b/scripts/gpm/smgl-suspend-gpm
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+RUNLEVEL=5
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+case "$1" in
+ start) $RUNLEVELS_DIR/*/gpm stop
+ evaluate_retval
+ ;;
+
+ stop) $RUNLEVELS_DIR/*/gpm start
+ evaluate_retval
+ ;;
+
+ *) exit 1
+ ;;
+esac
diff --git a/scripts/hal/hald b/scripts/hal/hald
new file mode 100755
index 0000000..59f5558
--- /dev/null
+++ b/scripts/hal/hald
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/hald
+ARGS="--daemon=yes"
+RUNLEVEL=3
+NEEDS="smgl-messagebus"
+PIDFILE=/var/run/hald.pid
+
+. /etc/init.d/smgl_init
diff --git a/scripts/havp/havp b/scripts/havp/havp
new file mode 100644
index 0000000..70f7bce
--- /dev/null
+++ b/scripts/havp/havp
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/havp
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting HTTP Anti-virus Proxy (HAVP)..."
+ su nobody -c "$PROGRAM"
+ evaluate_retval
+}
+
+restart()
+{
+ stop &&
+ start
+}
diff --git a/scripts/hc-cron/crond b/scripts/hc-cron/crond
new file mode 100644
index 0000000..bb6d439
--- /dev/null
+++ b/scripts/hc-cron/crond
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/crond
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/hddtemp/hddtemp b/scripts/hddtemp/hddtemp
new file mode 100755
index 0000000..113c360
--- /dev/null
+++ b/scripts/hddtemp/hddtemp
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. /etc/sysconfig/hddtemp
+
+PROGRAM=/usr/sbin/hddtemp
+RUNLEVEL=3
+NEEDS="+network"
+PIDFILE=/var/run/hddtemp.pid
+
+monitored_drives=""
+
+for drive in ${MONITORED_DRIVES}; do
+ if [[ drive != "/dev/*" ]]; then
+ drive="/dev/$drive"
+ fi
+ monitored_drives="$monitored_drives $drive"
+done;
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting $NAME..."
+ if [ -e $PIDFILE ] ; then
+ echo "$NAME already running";
+ else
+ $PROGRAM -d ${monitored_drives}
+ pidof $PROGRAM > $PIDFILE;
+ fi
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping $NAME..."
+ if [ -e $PIDFILE ] ; then
+ PID=`cat $PIDFILE`
+ kill -9 $PID && rm -f $PIDFILE;
+ else
+ echo "$NAME not running";
+ fi
+ evaluate_retval
+}
+
diff --git a/scripts/hddtemp/hddtemp.conf b/scripts/hddtemp/hddtemp.conf
new file mode 100644
index 0000000..ec8c5cf
--- /dev/null
+++ b/scripts/hddtemp/hddtemp.conf
@@ -0,0 +1,3 @@
+# A space separated list of hard disk drives that are to be monitored at
boot.
+# * can be used to monitor all hd* and/or sd* drives
+MONITORED_DRIVES="sda"
diff --git a/scripts/hdparm/hdparm b/scripts/hdparm/hdparm
new file mode 100755
index 0000000..a37b692
--- /dev/null
+++ b/scripts/hdparm/hdparm
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+PROGRAM=/sbin/hdparm
+ARGS=""
+RUNLEVEL=1
+
+. /etc/sysconfig/hdparm
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting hdparm..."
+ # SCSI/SATA
+ for drive in sd{a..z}; do
+ if [[ -b "/dev/$drive" ]]; then
+ $PROGRAM $common_params $disk_params $sata_params
"/dev/$drive"
+ fi
+ done
+
+ # PATA
+ for drive in hd{a..z}; do
+ if [[ -b "/dev/$drive" ]]; then
+ if [[ -f /sys/block/$drive/device/media ]];
+ then
+ if [[ "$(cat /sys/block/$drive/device/media)"
== "cdrom" ]];
+ then
+ $PROGRAM $common_params
$pata_cdrom_params $pata_params "/dev/$drive"
+ else
+ $PROGRAM $common_params $disk_params
$pata_disk_params $pata_params "/dev/$drive"
+ fi
+ fi
+ fi
+ done
+ evaluate_retval
+}
+
+stop()
+{
+ exit 0
+}
diff --git a/scripts/hdparm/hdparm.conf b/scripts/hdparm/hdparm.conf
new file mode 100644
index 0000000..1523043
--- /dev/null
+++ b/scripts/hdparm/hdparm.conf
@@ -0,0 +1,23 @@
+# parameters that apply to all drives
+#common_params="-K 1"
+common_params="-q "
+
+# parameters that apply only to harddrives
+#disk_params="-A 1 -W 1 -a 2048"
+disk_params=""
+
+# parameters that only apply to sata and scsi drives
+#sata_params="-M 254"
+sata_params=""
+
+# parameters that only apply to pata drives
+#pata_params="-c 1 -d 1 -k 1 -u 1"
+pata_params=""
+
+# parameters that only apply to pata harddrives
+#pata_disk_params="-m 16 -n 0"
+pata_disk_params=""
+
+# parameters that only apply to pata cdroms
+pata_cdrom_params=""
+
diff --git a/scripts/hibernate-script/hibernate-cleanup
b/scripts/hibernate-script/hibernate-cleanup
new file mode 100644
index 0000000..6c05fd4
--- /dev/null
+++ b/scripts/hibernate-script/hibernate-cleanup
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/hibernate
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+
+
+#
+# Copied and modified from hibernate-script-1.10.tar.gz for
+# Source Mage GNU/Linux by Eric Sandall <sandalle AT sourcemage.org> on
2005-07-20.
+#
+# This script invalidates any stale swsusp and Software Suspend 2 images. It
+# searches all swap partitions on your machine, as well as Suspend2's
+# filewriter files (by way of the hibernate script telling it where to find
+# it).
+#
+# It should be called on boot, after mounting filesystems, but before
enabling
+# swap or clearing out /var/run. Copy this into /etc/init.d/ (or the
appropriate
+# place on your system), then add a symlink at the appropriate point on boot.
+#
+
+HIBERNATE_FILEWRITER_TRAIL="/var/run/suspend2_filewriter_image_exists"
+
+function get_swap_id() {
+ local line
+ fdisk -l | while read line; do
+ case "$line" in
+ /*Linux\ [sS]wap*) echo "${line%% *}"
+ esac
+ done
+}
+
+function clear_swap() {
+ local where wason
+ where=$1
+ wason=
+ swapoff $where 2>/dev/null && wason=yes
+ mkswap $where > /dev/null || echo -n " (failed: $?)"
+ [ -n "$wason" ] && swapon $where
+}
+
+function check_swap_sig() {
+ local part="$(get_swap_id)"
+ local where what type rest p c
+ while read where what type rest ; do
+ test "$type" = "swap" || continue
+ c=continue
+ for p in $part ; do
+ test "$p" = "$where" && c=:
+ done
+ $c
+ case "$(dd if=$where bs=1 count=6 skip=4086 2>/dev/null)" in
+ S1SUSP|S2SUSP|pmdisk|[zZ]*)
+ echo -n "$where"
+ clear_swap $where
+ echo -n ", "
+ esac
+ done < /etc/fstab
+}
+
+function check_filewriter_sig() {
+ local target
+ [ -f "$HIBERNATE_FILEWRITER_TRAIL" ] || return
+ read target < $HIBERNATE_FILEWRITER_TRAIL
+ [ -f "$target" ] || return
+ case "`dd \"if=$target\" bs=8 count=1 2>/dev/null`" in
+ HaveImag)
+ /bin/echo -ne "Suspend2\n\0\0" | dd "of=$target"
bs=11 count=1 conv=notrunc 2>/dev/null
+ echo -n "$target, "
+ rm -f $HIBERNATE_FILEWRITER_TRAIL
+ esac
+}
+
+start() {
+ echo -n "Clearing Software Suspend 2 signatures... "
+ check_swap_sig
+ check_filewriter_sig
+ echo "done."
+}
+
+stop() {
+ echo -n "Nothing to stop... "
+}
+
+restart() {
+ echo -n "Nothing to restart... "
+}
+
diff --git a/scripts/hotplug/hotplug b/scripts/hotplug/hotplug
new file mode 100755
index 0000000..c81a02b
--- /dev/null
+++ b/scripts/hotplug/hotplug
@@ -0,0 +1,101 @@
+#!/bin/sh
+#
+# hotplug This scripts starts hotpluggable subsystems.
+#
+# chkconfig: 2345 01 99
+# description: Starts and stops each hotpluggable subsystem. \
+# On startup, may simulate hotplug events for devices \
+# that were present at boot time, before filesystems \
+# (or other resources) used by hotplug agents were available.
+#
+# $Id: hotplug,v 1.3 2002/12/03 02:01:48 dbrownell Exp $
+#
+# Modified for Source Mage GNU/Linux (http://www.sourcemage.org)
+# 2006-01-04 Arwed v. Merkatz <v.merkatz AT gmx.net>
+# * don't disable hotplug unless udev gets used on >= 2.6.15
+#
+# 2005-12-12 Treeve Jelbert <treeve01 AT pi.be>
+# * don't run if linux >= 2.6.15
+#
+# 2004-06-15 Seth Woolley <seth AT tautology.org>
+# * init.d echo underrides for child scripts.
+#
+# Modified for Source Mage GNU/Linux (http://www.sourcemage.org)
+# 2003-07-10 Eric Sandall <sandalle AT sourcemage.org>
+#
+# Modified for Source Mage GNU/Linux (http://www.sourcemage.org)
+# 2003-07-31 Jose Bernardo Silva <jbernardo AT sourcemage.org>
+#
+# SMGL-script-version=20030731
+#
+# SMGL-START:1 2 3 4 S:S11
+# SMGL-STOP:0 6:K89
+#
+
+PROGRAM=/bin/true
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+# source function library
+. /etc/init.d/smgl_init
+. /etc/sysconfig/devices
+
+ KVERREL=`uname -r`
+ KVER=${KVERREL%-*}
+ KVER_MAJOR=${KVER%.*}
+ KVER_MINOR=${KVER##*.}
+
+ if [ "$KVER_MAJOR" == "2.6" ]; then
+ # kernel 2.6.15-rc1 don't use hotplug
+ if [ $KVER_MINOR -ge 15 -a "$DEVICES" = "udev" ]; then
+ echo "hotplug not needed for kernel-$KVERREL"
+ exit 0
+ fi
+ fi
+
+
+start(){
+ [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
+ for RC in /etc/hotplug/*.rc
+ do
+ ( unset -f echo; $RC start )
+ done
+ touch /var/lock/subsys/hotplug
+ echo "Hotplug started"
+}
+
+restart(){
+ for RC in /etc/hotplug/*.rc
+ do
+ ( unset -f echo; $RC restart )
+ done
+}
+
+status(){
+ for RC in /etc/hotplug/*.rc
+ do
+ ( unset -f echo; $RC status )
+ done
+}
+
+stop(){
+ for RC in /etc/hotplug/*.rc
+ do
+ ( unset -f echo; $RC stop )
+ done
+ rm -f /var/lock/subsys/hotplug
+ echo "Hotplug stopped"
+}
+
+reload(){
+ for RC in /etc/hotplug/*.rc
+ do
+ ( unset -f echo; $RC stop )
+ done
+ for RC in /etc/hotplug/*.rc
+ do
+ ( unset -f echo; $RC start )
+ done
+ rm -f /var/lock/subsys/hotplug
+}
+
diff --git a/scripts/httpd-dev/apache b/scripts/httpd-dev/apache
new file mode 100755
index 0000000..be1d6fd
--- /dev/null
+++ b/scripts/httpd-dev/apache
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+. /etc/sysconfig/apache
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/httpd.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Apache web server..."
+ /usr/sbin/apachectl start
+ evaluate_retval
+}
+
+restart()
+{
+ echo "Restarting Apache web server..."
+ if [ -f $PIDFILE ]; then
+ /usr/sbin/apachectl restart
+ evaluate_retval
+ else
+ run_func start
+ fi
+}
+
+stop()
+{
+ echo "Stopping Apache web server..."
+ /usr/sbin/apachectl stop
+ evaluate_retval
+}
+
+status()
+{
+ getpids httpd
+ if [ -n "$pidlist" ]; then
+ echo "Apache is running with Process ID(s) $pidlist"
+ else
+ if [ -f $PIDFILE ]; then
+ echo "Apache is not running but $PIDFILE exists"
+ return 1
+ else
+ echo "Apache is not running"
+ fi
+ fi
+}
+
+reload()
+{
+ run_func restart
+}
diff --git a/scripts/ifplugd/ifplugd b/scripts/ifplugd/ifplugd
new file mode 100755
index 0000000..aae5549
--- /dev/null
+++ b/scripts/ifplugd/ifplugd
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PROGRAM=/usr/sbin/ifplugd
+
+CONFFILE=/etc/ifplugd/ifplugd.conf
+DROPFILE=/var/tmp/ifplugd.drop
+
+[[ ! -f $CONFFILE ]] && echo "No config file: $CONFFILE" && exit 1
+. $CONFFILE
+. /etc/init.d/smgl_init
+
+required_executable /usr/sbin/ifplugd
+
+(($#>1)) && INTERFACES="${@/$1}"
+[[ $INTERFACES == auto ]] && INTERFACES="$(cat /proc/net/dev | awk '{ print
$1 }' | egrep '^(eth|wlan)' | cut -d: -f1)"
+
+start()
+{
+ local STATE
+ for IF in $INTERFACES; do
+ echo "Starting daemon on interface $IF..."
+ A="$(eval builtin echo \$\{ARGS_${IF}\})"
+ [[ -z $A ]] && A="$ARGS"
+ $PROGRAM -i $IF $A
+ STATE=$?
+ if ((STATE==2)); then
+ echo "Link up."
+ unset STATE
+ elif ((STATE==3)); then
+ echo "Link down."
+ STATE=
+ fi
+ (exit $STATE)
+ evaluate_retval
+ done
+ /bin/echo "INTERFACES=\"$INTERFACES\"" > $DROPFILE
+}
+
+stop()
+{
+ [[ -f $DROPFILE ]] && . $DROPFILE && rm $DROPFILE
+ for IF in $INTERFACES; do
+ echo "Stopping daemon on interface $IF..."
+ $PROGRAM -k -i $IF -W
+ evaluate_retval
+ done
+}
+
+status()
+{
+ [[ -f $DROPFILE ]] && . $DROPFILE
+ for IF in $INTERFACES; do
+ echo "Status on interface $IF:"
+ $PROGRAM -c -i $IF
+ evaluate_retval
+ done
+}
+
+force-reload()
+{
+ stop
+ sleep 3
+ start
+}
diff --git a/scripts/ifupdown/mountnetwork b/scripts/ifupdown/mountnetwork
new file mode 100755
index 0000000..730529f
--- /dev/null
+++ b/scripts/ifupdown/mountnetwork
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/sysconfig/mountnetwork
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network"
+PROVIDES="remote_fs"
+
+file_system_list=""
+
+for fs in ${FILESYSTEMS} ; do
+ if [[ $fs == "nfs" ]] ; then
+ NEEDS="$NEEDS +portmap"
+ fi
+ file_system_list="$file_system_list,$fs"
+done
+file_system_list=${file_system_list:1}
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ if [ "$file_system_list" != "" ] ; then
+ required_executable /bin/mount
+
+ echo "Mounting remote filesystems..."
+ mount -a -F -t $file_system_list
+ evaluate_retval
+ fi
+}
+
+stop()
+{
+ if [ "$file_system_list" != "" ] ; then
+ required_executable /bin/umount
+
+ echo "Unmounting remote filesystems..."
+ umount -a -r -t $file_system_list
+ evaluate_retval
+ fi
+}
+
diff --git a/scripts/ifupdown/mountnetwork.conf
b/scripts/ifupdown/mountnetwork.conf
new file mode 100644
index 0000000..3211ca4
--- /dev/null
+++ b/scripts/ifupdown/mountnetwork.conf
@@ -0,0 +1,4 @@
+# A space separated list of network file systems that are to be mounted at
+# boot. Supported values are "cifs", "nfs", "ncpfs", "smbfs" and "9p"
(without
+# the quotes). The /usr hierachy may be loaded through this script.
+FILESYSTEMS="cifs nfs ncpfs smbfs 9p"
diff --git a/scripts/ifupdown/network b/scripts/ifupdown/network
new file mode 100755
index 0000000..b1dbe48
--- /dev/null
+++ b/scripts/ifupdown/network
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+PROGRAM=/bin/false # To get auto_init functionality
+RUNLEVEL=3
+PROVIDES=network
+
+[ "$USE_SYSLOG" = "yes" ] && NEEDS="+syslog"
+
+. /etc/init.d/smgl_init
+
+required_executable /sbin/ifup
+required_executable /sbin/ifdown
+
+start()
+{
+ # make sure all the interfaces really do come up
+ echo "Starting networking..."
+ /sbin/ifup --force -a
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping networking..."
+ /sbin/ifdown -a
+ evaluate_retval
+}
+
+restart()
+{
+ echo "Restarting ALL interfaces"
+ stop
+ # sleeping for some trickle time
+ sleep 3
+ start
+}
+
+status()
+{
+ exit 0
+}
+
+reload() { exit 3; }
+
+usage()
+{
+ echo "Usage: $0 {start|stop|restart|status} [DEVICE]"
+}
diff --git a/scripts/ijb-waldhoff/junkbuster b/scripts/ijb-waldhoff/junkbuster
new file mode 100644
index 0000000..db94a88
--- /dev/null
+++ b/scripts/ijb-waldhoff/junkbuster
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/junkbuster
+ARGS="/etc/junkbuster/config"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/ijb/junkbuster b/scripts/ijb/junkbuster
new file mode 100644
index 0000000..2527c0d
--- /dev/null
+++ b/scripts/ijb/junkbuster
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/junkbuster
+ARGS="/etc/junkbuster/junkbstr.ini"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/init.d/devices b/scripts/init.d/devices
new file mode 100755
index 0000000..8fb142b
--- /dev/null
+++ b/scripts/init.d/devices
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+PROGRAM=/bin/false
+RUNLEVEL=DEV
+ESSENTIAL=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/devices
+
+start_devfs()
+{
+ if ! [ -e /dev/.devfsd ]
+ then echo "Mounting devfs on /dev"
+ mount -n -t devfs devfs /dev
+ evaluate_retval
+ fi
+
+ echo "Telling init to reopen file descriptors"
+ kill -USR1 1
+
+ if [ ! -x "/sbin/devfsd" ] ; then
+ ln -sf /proc/self/fd /dev/fd
+ ln -sf /dev/fd/0 /dev/stdin
+ ln -sf /dev/fd/1 /dev/stdout
+ ln -sf /dev/fd/2 /dev/stderr
+ fi
+}
+
+start_udev()
+{ (
+ . /etc/udev/udev.conf
+ # mount sysfs
+ echo "Mounting sysfs at /sys"
+ mount -n -t sysfs none /sys
+ echo "Mounting ramfs at $udev_root"
+ mount -n -t ramfs none $udev_root
+ # create some needed stuff
+ ln -s /proc/self/fd $udev_root/fd
+ ln -s /dev/fd/0 $udev_root/stdin
+ ln -s /dev/fd/1 $udev_root/stdout
+ ln -s /dev/fd/2 $udev_root/stderr
+ mkdir $udev_root/shm
+ mkdir $udev_root/pts
+
+# strip out kernel sublevel and patchlevel so we can check against them
+# since we don't support 1.x linux kernels then we don't have to check that
+ PATCHLEVEL=`uname -r | cut -d. -f2`
+ SUBLEVEL=`uname -r | cut -d. -f3`
+ tmp=`uname -r | cut -d. -f3 | sed 's/^[0-9]*//g'`
+ SUBLEVEL=${SUBLEVEL/$tmp/}
+
+ # kernel 2.6.15-rc1 and higher don't use hotplug
+ if [ $SUBLEVEL -ge 15 -a $PATCHLEVEL -ge 6 ]; then
+ echo "don't need hotplug for this kernel"
+ builtin echo > /proc/sys/kernel/hotplug
+ else
+ # Now uses udevsend as the hotplug multiplexer
+ echo "Setting udevsend as hotplug agent"
+ sysctl -w kernel.hotplug="/sbin/udevsend" > /dev/null 2>&1
+ echo "Creating initial udev device nodes"
+ /sbin/udevstart
+ fi
+
+ if [ -f /etc/udev/udev.missing ]; then
+ echo "Processing /etc/udev/udev.missing"
+ cd /dev
+ while read line; do
+ if [ "${line:0:1}" == "#" ]; then continue; fi
+ for ((i=0; i<7; i++)); do
+ val[$i]=${line%%:*}
+ line=${line#*:}
+ done
+ if [ "${val[1]}" == "d" ]; then
+ mkdir ${val[0]}
+ else
+ mknod ${val[0]} ${val[1]} ${val[2]} ${val[3]}
+ fi
+ chmod ${val[4]} ${val[0]}
+ chown ${val[5]}:${val[6]} ${val[0]}
+ done < /etc/udev/udev.missing
+ cd /
+ fi
+ echo "Telling init to reopen file descriptors"
+ kill -USR1 1
+) }
+
+start_static()
+{
+ exit 0
+}
+
+start()
+{
+ # mount proc
+ echo "Mounting /proc"
+ mount -n -t proc proc /proc
+ eval "start_$DEVICES"
+}
+
+stop() { exit 0; }
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+status() { exit 3; }
+
+usage()
+{
+ echo "Usage: $0 {start|stop}"
+ echo "Warning: Do not run this script manually!"
+}
diff --git a/scripts/init.d/devices.conf b/scripts/init.d/devices.conf
new file mode 100644
index 0000000..287f0cc
--- /dev/null
+++ b/scripts/init.d/devices.conf
@@ -0,0 +1,2 @@
+# type of device management, "static", "devfs" or "udev"
+DEVICES=devfs
diff --git a/scripts/init.d/facilities.conf b/scripts/init.d/facilities.conf
new file mode 100644
index 0000000..68026c0
--- /dev/null
+++ b/scripts/init.d/facilities.conf
@@ -0,0 +1,23 @@
+root_fs=
+
+modules=
+
+network=
+
+syslog=
+
+local_fs=
+
+crypt_fs=
+
+remote_fs=
+
+identd=
+
+portmap=
+
+# sendmail, postfix
+mta=
+
+# xdm, gdm, ...
+display_manager=
diff --git a/scripts/init.d/hostname.sh b/scripts/init.d/hostname.sh
new file mode 100755
index 0000000..34954a7
--- /dev/null
+++ b/scripts/init.d/hostname.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+PROGRAM=/bin/hostname
+RUNLEVEL=S
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ required_executable /bin/hostname
+ required_executable /sbin/ifconfig
+
+ echo "Setting hostname..."
+ # not -F /etc/hostname since coreutils hostname doesn't like it.
+ /bin/hostname "`cat /etc/hostname`"
+ evaluate_retval
+
+ if [ -e /etc/defaultdomain ]; then
+ echo "Setting domain name..."
+ /bin/domainname "`cat /etc/defaultdomain`"
+ evaluate_retval
+ fi
+
+ echo "Setting up local network interface..."
+ ifconfig lo 127.0.0.1 broadcast 127.255.255.255 netmask 255.0.0.0
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Cannot stop hostname"
+}
diff --git a/scripts/init.d/init.conf b/scripts/init.d/init.conf
new file mode 100644
index 0000000..2b1e9e2
--- /dev/null
+++ b/scripts/init.d/init.conf
@@ -0,0 +1,30 @@
+# This is the runlevel which will be entered when booting the computer.
+DEFAULT_RUNLEVEL=3
+
+# How should an essential script failure be handled?
+# Possible values:
+# ignore - Attempt to continue as far as possible.
+# abort - Stop boot process and start a rescue shell.
+# ask - Allow any of the above options to be chosen.
+ESSENTIAL_FAIL_ACTION=ask
+
+# This is the directory holding the different runlevels. Do not change unless
+# you have a very good reason.
+RUNLEVELS_DIR=/etc/init.d/runlevels
+
+# Set this to PARALLEL_INIT="yes" if you want to try out PARALLEL_INIT.
+# Empty string or unset disables.
+PARALLEL_INIT=
+
+# Set this to SYSLOG_INIT="yes" if you want to log init.d messages to syslog.
+# Empty string or unset disables.
+SYSLOG_INIT=
+
+# Set this to FSCKFIX="yes" for fsck -y (always fix).
+FSCKFIX=
+
+# Set this to NOSOFTFIX="yes" for no fsck -a (non-interactive fix).
+NOSOFTFIX=
+
+# Set this to FORCE="yes" for fsck -f (force fsck).
+FORCE=
diff --git a/scripts/init.d/mountall.conf b/scripts/init.d/mountall.conf
new file mode 100644
index 0000000..9424519
--- /dev/null
+++ b/scripts/init.d/mountall.conf
@@ -0,0 +1,3 @@
+# This variable controls if you want removal of /tmp contents
+# on bootup(default unset to set put yes in)
+CLEAN_TMP=
diff --git a/scripts/init.d/mountall.sh b/scripts/init.d/mountall.sh
new file mode 100755
index 0000000..eead8c3
--- /dev/null
+++ b/scripts/init.d/mountall.sh
@@ -0,0 +1,172 @@
+#!/bin/sh
+# vim:set ts=2 sw=2 et:
+
+PROGRAM=/bin/false
+RUNLEVEL=S
+NEEDS="+root_fs"
+WANTS="+modules +crypt_fs"
+PROVIDES=local_fs
+ESSENTIAL=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+. /etc/sysconfig/mountall
+
+function recursive_rm() {
+ for file in "$@" ; do
+ if [ -h $file ] ; then
+ unlink $file
+ elif [ -d $file ] ; then
+ recursive_rm "$file"/*
+ else
+ rm -f "$file"
+ fi
+ done
+}
+
+checkfs()
+{
+ [ -e /fastboot ] && return
+ [ -e /forcefsck ] && FORCE="-f"
+ [ "$NOSOFTFIX" != yes ] && FIX="-a"
+ [ "$FSCKFIX" = yes ] && FIX="-y"
+ [ -z "$FIX" ] && FIX="-n" # need at least -n, -y, or -a for
non-tty fsck
+ [ "$FORCE" = yes ] && FORCE="-f"
+
+ echo "Checking file systems..."
+ /sbin/fsck -T -C -A -R $FIX $FORCE
+ evaluate_retval
+
+ if [ $? -gt 1 ]; then
+ $WARNING
+ echo "fsck failed."
+ echo "Please repair your file system"
+ echo "manually by running /sbin/fsck"
+ echo "without the -a option"
+ $NORMAL
+ /sbin/sulogin
+ /sbin/reboot -f
+ fi
+
+ rm -f /fastboot /forcefsck
+}
+
+scanlvm()
+{
+ # find devices that were set up in initramfs/rd
+ if optional_executable /sbin/dmsetup
+ then
+ echo "(re)Creating device mapper nodes..."
+ # won't check retval because kernel just may lack device mapper
+ /sbin/dmsetup mknodes
+ fi
+
+ if optional_executable /sbin/vgscan && optional_executable /sbin/vgchange
; then
+ echo "Scanning for and initializing all available LVM volume groups..."
+ /sbin/vgscan --ignorelockingfailure --mknodes &&
+ /sbin/vgchange -ay --ignorelockingfailure
+ fi
+}
+
+start_cryptfs()
+{
+ if optional_executable /usr/sbin/cryptsetup && [ -f /etc/crypttab ]
+ then
+ echo "Attempting to open luks encrypted partitions"
+ grep -v '^#' /etc/crypttab |
+ grep -v '^$' |
+ while read line
+ do
+ parts=( $line )
+ echo "Opening ${parts[0]} as ${parts[1]}"
+ if cryptsetup isLuks ${parts[0]}
+ then
+ if [[ -b /dev/mapper/${parts[1]} ]]
+ then
+ builtin echo "Device already exists maybe its open already"
+ else
+ cryptsetup luksOpen ${parts[0]} ${parts[1]} < /dev/console >
/dev/console 2>&1
+ fi
+ else
+ builtin echo "Error device ${parts[0]} isn't a luks partition"
+ return 1
+ fi
+ done
+ fi
+}
+
+start()
+{
+ required_executable /bin/mount
+ required_executable /sbin/fsck
+
+ scanlvm
+ evaluate_retval
+
+ start_cryptfs
+ evaluate_retval
+
+ checkfs
+
+ if optional_executable /sbin/swapon ; then
+ echo -n "Activating swap... "
+ swapon -a 2> /dev/null
+ evaluate_retval
+ fi
+
+ echo "Mounting local filesystems..."
+# Fixed so as to not mount networked filesystems yet (no networking)
+# mountnetwork.sh will take care of this.
+ mount -a -t nocifs,noncpfs,nonfs,nosmbfs,notmpfs,no9p
+# mount tmpfs mounts after physical partitions they might mount to (bug 3597)
+ mount -a -t tmpfs
+ evaluate_retval
+
+ # bug 7311 - if proc was mounted, list it in mtab; awk is /usr friendly
+ if awk 'BEGIN{proc=1} /\/proc/{proc=0} END{exit proc}' /proc/mounts; then
+ builtin echo 'none /proc proc rw 0 0' >> /etc/mtab
+ fi
+
+#As per FHS sm bug #10509
+ echo "Cleaning out /var/run..."
+ [ -d /var/run ] && recursive_rm /var/run/*
+ evaluate_retval
+
+ if [ "$CLEAN_TMP" == "yes" ] ; then
+ echo "Cleaning out /tmp..."
+ [ -d /tmp ] && shopt -s dotglob && rm -rf /tmp/* && shopt -u dotglob
+ evaluate_retval
+ fi
+
+ echo "Creating /var/run/utmp..."
+ [ -d /var/run ] && touch /var/run/utmp
+ evaluate_retval
+
+ echo "Writing dmesg log to /var/log/dmesg..."
+ [ -d /var/log ] && dmesg > /var/log/dmesg
+ evaluate_retval
+
+ echo "Making /tmp/.ICE-unix temporary directory..."
+ [ -d /tmp ] && mkdir -p /tmp/.ICE-unix && chmod 1777 /tmp/.ICE-unix
+ evaluate_retval
+
+ exit 0
+}
+
+
+# Simpleinit handles umounting and stuff.
+stop()
+{
+ exit 0
+}
+
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+status() { exit 3; }
+
+usage()
+{
+ echo "Usage: $0 {start|stop}"
+ echo "Warning: Do not run this script manually!"
+}
diff --git a/scripts/init.d/mountroot.sh b/scripts/init.d/mountroot.sh
new file mode 100755
index 0000000..a3883bb
--- /dev/null
+++ b/scripts/init.d/mountroot.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+# vim:set ts=2 sw=2 et:
+
+PROGRAM=/bin/false
+RUNLEVEL=S
+PROVIDES=root_fs
+ESSENTIAL=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+checkrootfs()
+{
+ [ -e /fastboot ] && return
+ [ -e /forcefsck ] && FORCE="-f"
+ [ "$NOSOFTFIX" != yes ] && FIX="-a"
+ [ "$FSCKFIX" = yes ] && FIX="-y"
+ [ -z "$FIX" ] && FIX="-n" # need at least -n, -y, or -a for
non-tty fsck
+ [ "$FORCE" = yes ] && FORCE="-f"
+
+ echo "Checking root file system..."
+ /sbin/fsck -T -C $FIX $FORCE /
+ evaluate_retval
+
+ if [ $? -gt 1 ]; then
+ $WARNING
+ echo "fsck failed."
+ echo "Please repair your file system"
+ echo "manually by running /sbin/fsck"
+ echo "without the -a option"
+ $NORMAL
+ /sbin/sulogin
+ /sbin/reboot -f
+ fi
+}
+
+scanlvm()
+{
+ # find devices that were set up in initramfs/rd
+ if optional_executable /sbin/dmsetup
+ then
+ echo "(re)Creating device mapper nodes..."
+ # won't check retval because kernel just may lack device mapper
+ /sbin/dmsetup mknodes
+ fi
+
+ if optional_executable /sbin/vgscan && optional_executable /sbin/vgchange
; then
+ echo "Scanning for and initializing all available LVM volume groups..."
+ /sbin/vgscan --ignorelockingfailure --mknodes &&
+ /sbin/vgchange -ay --ignorelockingfailure
+ fi
+}
+
+start()
+{
+ required_executable /bin/mount
+ required_executable /sbin/fsck
+
+ #
+ # Prefer the newer mdadm to raidtools
+ #
+ if [ -f /etc/mdadm.conf ] ; then
+ mdadm --assemble --scan
+ mdadm --follow --scan --delay=120 --daemonise >
/var/run/mdadm.pid
+ elif [ -f /etc/raidtab ] ; then
+ raidstart --all
+ fi
+
+ scanlvm
+ evaluate_retval
+
+ echo "Mounting root file system read only..."
+ mount -n -o remount,ro /
+ evaluate_retval || exit 1
+
+ checkrootfs
+
+ echo "Mounting root file system read/write..."
+ {
+ mount -n -o remount,rw / &&
+ if ! [[ -h /etc/mtab ]]; then
+ builtin echo > /etc/mtab
+ fi &&
+ mount -f -o remount,rw /
+ } || exit 1
+
+ evaluate_retval || exit 1
+
+ exit 0
+}
+
+
+# Simpleinit handles umounting and stuff.
+stop()
+{
+ exit 0
+}
+
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+status() { exit 3; }
+
+usage()
+{
+ echo "Usage: $0 {start|stop}"
+ echo "Warning: Do not run this script manually!"
+}
diff --git a/scripts/init.d/shutdown.conf b/scripts/init.d/shutdown.conf
new file mode 100644
index 0000000..ed0528a
--- /dev/null
+++ b/scripts/init.d/shutdown.conf
@@ -0,0 +1,2 @@
+# Default to turn off the power supply (power_off) instead of just halting
(halt).
+HALT_ACTION=power_off
diff --git a/scripts/init.d/single b/scripts/init.d/single
new file mode 100755
index 0000000..d0a2266
--- /dev/null
+++ b/scripts/init.d/single
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+RUNLEVEL=S
+NEEDS="+local_fs"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+
+case "$1" in
+ start) echo "Entering single user mode..."
+ cat > /etc/nologin << EOF
+The system is currently in single user mode.
+
+Login is therefore restricted to root.
+EOF
+ evaluate_retval
+ ;;
+
+ stop) echo "Leaving single user mode..."
+ rm /etc/nologin
+ evaluate_retval
+ ;;
+
+ *) exit 1
+ ;;
+esac
diff --git a/scripts/init.d/smgl-default-crypt-fs
b/scripts/init.d/smgl-default-crypt-fs
new file mode 100755
index 0000000..7788f31
--- /dev/null
+++ b/scripts/init.d/smgl-default-crypt-fs
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+RUNLEVEL=S
+PROVIDES=crypt_fs
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+
+exit 0
diff --git a/scripts/init.d/smgl-default-remote-fs
b/scripts/init.d/smgl-default-remote-fs
new file mode 100755
index 0000000..58af326
--- /dev/null
+++ b/scripts/init.d/smgl-default-remote-fs
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+RUNLEVEL=3
+PROVIDES=remote_fs
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+
+exit 0
diff --git a/scripts/init.d/smgl-misc b/scripts/init.d/smgl-misc
new file mode 100644
index 0000000..5783c8a
--- /dev/null
+++ b/scripts/init.d/smgl-misc
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+local_fs"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+
+case $1 in
+ start) if [ -r /etc/sysconfig/bootmisc ] ; then
+ echo "Running /etc/sysconfig/bootmisc..."
+ if [ -x /etc/sysconfig/bootmisc ] ; then
+ . /etc/sysconfig/bootmisc
+ evaluate_retval
+ else
+ echo "Skipping /etc/sysconfig/bootmisc as nonexecutable..."
+ evaluate_retval
+ fi
+ fi
+ ;;
+
+ stop) if [ -r /etc/sysconfig/haltmisc ] ; then
+ echo "Running /etc/sysconfig/haltmisc..."
+ if [ -x /etc/sysconfig/haltmisc ] ; then
+ . /etc/sysconfig/haltmisc
+ evaluate_retval
+ else
+ echo "Skipping /etc/sysconfig/haltmisc as nonexecutable..."
+ evaluate_retval
+ fi
+ fi
+ ;;
+
+ *) echo "Usage: $0 {start|stop}"
+ echo "start runs /etc/sysconfig/bootmisc, stop runs
/etc/sysconfig/haltmisc."
+ exit 1
+ ;;
+esac
diff --git a/scripts/init.d/smgl-suspend-single
b/scripts/init.d/smgl-suspend-single
new file mode 100755
index 0000000..cb826d0
--- /dev/null
+++ b/scripts/init.d/smgl-suspend-single
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+RUNLEVEL=2
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+case "$1" in
+ start) $RUNLEVELS_DIR/*/single stop
+ evaluate_retval
+ ;;
+
+ stop) $RUNLEVELS_DIR/*/single start
+ evaluate_retval
+ ;;
+
+ *) exit 1
+ ;;
+esac
diff --git a/scripts/ipcad/ipcad b/scripts/ipcad/ipcad
new file mode 100644
index 0000000..6deb391
--- /dev/null
+++ b/scripts/ipcad/ipcad
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/ipcad
+ARGS="-rds"
+NEEDS="+network"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/iplog/iplog b/scripts/iplog/iplog
new file mode 100644
index 0000000..f9b4415
--- /dev/null
+++ b/scripts/iplog/iplog
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Source Mage init.d install information
+# SMGL-START:2 3 4 5:S40
+# SMGL-STOP:0 1 6:K60
+#
+
+source /etc/init.d/functions
+
+BIN_PATH=/usr/sbin
+CFG_FILE=/etc/iplog.conf
+IFACE=eth0
+
+case $1 in
+
+ start)
+ echo "Starting iplog, TCP/IP traffic logger."
+ mkdir -p /var/run/iplog
+ chown iplog.iplog /var/run/iplog -R
+ loadproc ${BIN_PATH}/iplog -i ${IFACE} -u iplog -g iplog
+ ;;
+
+ stop)
+ echo "Stoping iplog, TCP/IP traffic logger."
+ ${BIN_PATH}/iplog -k
+ evaluate_retval
+ ;;
+
+ restart)

+ echo "Restarting iplog"
+ ${BIN_PATH}/iplog -R
+ evaluate_retval
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ ;;
+
+esac
diff --git a/scripts/iplog/iplog.sh b/scripts/iplog/iplog.sh
new file mode 100644
index 0000000..f9b4415
--- /dev/null
+++ b/scripts/iplog/iplog.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Source Mage init.d install information
+# SMGL-START:2 3 4 5:S40
+# SMGL-STOP:0 1 6:K60
+#
+
+source /etc/init.d/functions
+
+BIN_PATH=/usr/sbin
+CFG_FILE=/etc/iplog.conf
+IFACE=eth0
+
+case $1 in
+
+ start)
+ echo "Starting iplog, TCP/IP traffic logger."
+ mkdir -p /var/run/iplog
+ chown iplog.iplog /var/run/iplog -R
+ loadproc ${BIN_PATH}/iplog -i ${IFACE} -u iplog -g iplog
+ ;;
+
+ stop)
+ echo "Stoping iplog, TCP/IP traffic logger."
+ ${BIN_PATH}/iplog -k
+ evaluate_retval
+ ;;
+
+ restart)

+ echo "Restarting iplog"
+ ${BIN_PATH}/iplog -R
+ evaluate_retval
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ ;;
+
+esac
diff --git a/scripts/irda-utils/irda b/scripts/irda-utils/irda
new file mode 100755
index 0000000..b7b53f2
--- /dev/null
+++ b/scripts/irda-utils/irda
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/irattach
+RUNLEVEL=3
+
+# Source function library.
+. /etc/init.d/smgl_init
+
+# Source IrDA networking configuration.
+. /etc/sysconfig/irda
+
+# Check that irda is up.
+[ ${IRDA} = "no" ] && exit 0
+
+[ -f /usr/sbin/irattach ] || exit 0
+
+ARGS=
+if [ $DONGLE ]; then
+ ARGS="$ARGS -d $DONGLE"
+fi
+if [ "$DISCOVERY" = "yes" ];then
+ ARGS="$ARGS -s"
+fi
+
+# See how we were called.
+start()
+{
+ # Attach irda device
+ echo "Starting IrDA: "
+ /usr/sbin/irattach ${DEVICE} ${ARGS}
+ evaluate_retval
+ # touch /var/lock/subsys/irda
+ # SMGL uses a tmpfs /var/lock, this is safer
+ if [ ! -d /var/lock/subsys ]; then
+ mkdir /var/lock/subsys
+ touch /var/lock/subsys/irda
+ elif [ ! -f /var/lock/subsys/irda ]; then
+ touch /var/lock/subsys/irda
+ fi
+}
+
+stop()
+{
+ echo "Shutting down IrDA: "
+ killproc irattach
+ rm -f /var/lock/subsys/irda
+}
+
+status()
+{
+ status irattach
+}
+
diff --git a/scripts/irqbalance/irqbalance b/scripts/irqbalance/irqbalance
new file mode 100755
index 0000000..8677c98
--- /dev/null
+++ b/scripts/irqbalance/irqbalance
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/irqbalance
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
diff --git a/scripts/ivman/ivman b/scripts/ivman/ivman
new file mode 100644
index 0000000..32df2d2
--- /dev/null
+++ b/scripts/ivman/ivman
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/ivman
+RUNLEVEL=3
+NEEDS="hald"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/jabberd/jabberd b/scripts/jabberd/jabberd
new file mode 100755
index 0000000..470c514
--- /dev/null
+++ b/scripts/jabberd/jabberd
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/jabberd
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+killAndWait() {
+ #$1 is pidfile to wait for
+ if [[ "$(ps -eaf | grep $(cat $1) | grep -v grep)" != "" ]]; then
+ kill $(cat $1)
+ while [[ "$(ps -eaf | grep $(cat $1) | grep -v grep)" != ""
]]; do
+ sleep 0.5
+ done
+ fi
+ # always have to remove the pid file, because jabberd doesn't clean up
+ # after itself
+ rm $1
+}
+
+start() {
+ echo "Starting jabberd..."
+ su -s /bin/bash jabber -c "$PROGRAM &"
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping jabberd..."
+ if [ -f /var/jabberd/pid/router.pid ] && [[
+ "$(ps -eaf | grep $(cat /var/jabberd/pid/router.pid) | grep
-v grep)" != "" ]]; then
+
+ killAndWait /var/jabberd/pid/router.pid
+
+ if [[ "$(ps -eaf | grep $(cat /var/jabberd/pid/*.pid) | grep
-v grep)" == "" ]]; then
+ echo "Jabber services not running but pidfiles
exists! Cleaning..."
+ rm /var/jabberd/pid/*.pid
+ else
+ killAndWait /var/jabberd/pid/router.pid
+ echo "Ensuring the rest of the server went down"
+ for foo in $(ls /var/jabberd/pid/*.pid); do
+ killAndWait $foo
+ done
+ fi
+ fi
+ #ps -eaf | grep $(cat pid/router.pid ) | grep -v grep
+}
+
+restart() {
+ stop
+ start
+}
+
+status() {
+ local JABBERPIDS=""
+ if [[ "$(ls /var/jabberd/pid)" != "" ]]; then
+ for foo in $(ls /var/jabberd/pid/*.pid); do
+ JABBERPIDS="$JABBERPIDS $(cat $foo)"
+ done
+ echo "Jabber services running at pids:$JABBERPIDS"
+ else
+ echo "Jabber services are not running"
+ fi
+}
+
diff --git a/scripts/kbd/keymap.conf b/scripts/kbd/keymap.conf
new file mode 100644
index 0000000..bfd1be7
--- /dev/null
+++ b/scripts/kbd/keymap.conf
@@ -0,0 +1,25 @@
+# Keymap to use for the system keyboard.
+KEYMAP=defkeymap
+
+# Includemaps to load.
+INCLUDEMAPS=
+
+# Arguments passed to the setfont program. Use this to set the console
+# font and character map.
+# For example, to use unicode font with Western European charmap:
+# SETFONT_ARGS="lat9u-16 -m 8859-15"
+# Notice: TTY_NUMS must be defined for this to have effect.
+SETFONT_ARGS=
+
+# Consoles for which to apply font, charmap and unicode settings. If
+# value "*" is given, settings will be enabled for all available
+# console nodes.
+# Example: TTY_NUMS="1 2 3"
+# Notice: This must be defined for SETFONT_ARGS and UNICODE_START to
+# have effect.
+TTY_NUMS=
+
+# Toggle unicode. Unicode is enabled if variable is set (any value will
+# do).
+# Notice: TTY_NUMS must be defined for this to have effect.
+UNICODE_START=
diff --git a/scripts/kbd/keymap.sh b/scripts/kbd/keymap.sh
new file mode 100755
index 0000000..79342c6
--- /dev/null
+++ b/scripts/kbd/keymap.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/loadkeys
+RUNLEVEL=S
+NEEDS="+local_fs"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/keymap
+. /etc/sysconfig/devices
+
+dropfile=/var/tmp/keymap.drop
+
+start()
+{
+ [[ "$TTY_NUMS" ]] && [[ "$SETFONT_ARGS" ]] &&
+ required_executable /usr/bin/setfont
+ [[ "$KEYMAP$INCLUDEMAPS" ]] &&
+ required_executable /usr/bin/loadkeys
+
+ if [[ "$KEYMAP" ]]; then
+ echo "$(/usr/bin/loadkeys $KEYMAP 2>&1)"
+ evaluate_retval
+ fi
+
+ for a in $INCLUDEMAPS; do
+ [[ $(find /usr/share/kbd/keymaps/ -type f -name "$a.inc*" 2>/dev/null)
]] &&
+ [[ ! $(find /usr/share/kbd/keymaps/ -type f -name "$a.map*" 2>/dev/null)
]] &&
+ a="$a.inc"
+ echo "$(/usr/bin/loadkeys $a 2>&1)"
+ evaluate_retval
+ done
+
+ [[ "$DEVICES" == "devfs" ]] && DEV_TTY="vc/" || DEV_TTY="tty"
+
+ if [[ "$UNICODE_START" ]]; then
+ required_executable /usr/bin/unicode_start
+ /usr/bin/kbd_mode -u
+ /usr/bin/dumpkeys | /usr/bin/loadkeys --unicode
+ fi
+
+ if [[ "$TTY_NUMS" == '*' ]]; then
+ TTY_NUMS=
+ for a in $(grep ^tty.*: /etc/inittab); do
+ TTY_NUMS="$TTY_NUMS $(expr "$a" : 'tty\([0-9]*\):.*')"
+ done
+ fi
+
+ for n in $TTY_NUMS; do
+ echo "Loading settings for $DEV_TTY$n..."
+ [[ "$UNICODE_START" ]] && /bin/echo -ne "\033%G" > /dev/$DEV_TTY$n
+ if [[ "$SETFONT_ARGS" ]]; then
+ /usr/bin/setfont $SETFONT_ARGS -C /dev/$DEV_TTY$n
+ evaluate_retval
+ fi
+ done
+
+ [[ -f $dropfile ]] && rm $dropfile
+ STATUS_VARS="KEYMAP INCLUDEMAPS SETFONT_ARGS TTY_NUMS UNICODE_START
DEV_TTY"
+ for a in $STATUS_VARS; do
+ /bin/echo "$a=\"${!a}\"" >> $dropfile
+ done
+}
+
+stop()
+{
+ [[ "$TTY_NUMS" ]] && [[ "$SETFONT_ARGS" ]] &&
+ required_executable /usr/bin/setfont
+
+ [[ -f $dropfile ]] && . $dropfile && rm $dropfile
+
+ [[ "$KEYMAP$INCLUDEMAPS" ]] &&
+ required_executable /usr/bin/loadkeys &&
+ echo "$(/usr/bin/loadkeys defkeymap 2>&1)"
+
+ [[ "$UNICODE_START" ]] &&
+ required_executable /usr/bin/unicode_stop &&
+ /usr/bin/kbd_mode -a
+
+ for n in $TTY_NUMS; do
+ echo "Unloading settings for $DEV_TTY$n..."
+ [[ "$UNICODE_START" ]] && /bin/echo -ne '\033%@' > /dev/$DEV_TTY$n
+ if [[ "$SETFONT_ARGS" ]]; then
+ /usr/bin/setfont default8x16 -C /dev/$DEV_TTY$n
+ evaluate_retval
+ fi
+ done
+}
+
+status()
+{
+ if [[ ! -f $dropfile ]]; then
+ echo "No status info available."
+ return 1
+ fi
+
+ . $dropfile
+
+ echo "KEYMAP=\"$KEYMAP\""
+ echo "INCLUDEMAPS=\"$INCLUDEMAPS\""
+ echo "SETFONT_ARGS=\"$SETFONT_ARGS\""
+ echo "TTY_NUMS=\"$TTY_NUMS\""
+ echo "UNICODE_START=\"$UNICODE_START\""
+}
diff --git a/scripts/kdebase-workspace4/kdm4 b/scripts/kdebase-workspace4/kdm4
new file mode 100755
index 0000000..d60e7b1
--- /dev/null
+++ b/scripts/kdebase-workspace4/kdm4
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+PROGRAM=/opt/kde4/bin/kdm
+RUNLEVEL=5
+PROVIDES=display_manager
+NEEDS="smgl-messagebus"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/kdebase/kdm b/scripts/kdebase/kdm
new file mode 100755
index 0000000..aaa5fd6
--- /dev/null
+++ b/scripts/kdebase/kdm
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PROGRAM=/usr/bin/kdm
+RUNLEVEL=5
+PROVIDES=display_manager
+
+. /etc/init.d/smgl_init
diff --git a/scripts/keepalived/keepalived b/scripts/keepalived/keepalived
new file mode 100644
index 0000000..dbd9ba4
--- /dev/null
+++ b/scripts/keepalived/keepalived
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+
+RUNLEVEL=3
+PID_FILE="/var/run/keepalived.pid"
+PROGRAM="/usr/sbin/keepalived"
+
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+
+start ()
+{
+ echo "Starting Keepalived"
+ keepalived -D
+ touch /var/lock/subsys/keepalived
+ evaluate_retval
+}
+
+stop ()
+{
+ echo "Shutting down Keepalived"
+ PID=`cat $PID_FILE`
+ kill $PID
+ rm -rf /var/lock/subsys/keepalived
+ evaluate_retval
+}
+
+restart()
+{
+ run_func stop
+ sleep 1
+ run_func start
+}
+
+reload()
+{
+ run_func restart
+}
\ No newline at end of file
diff --git a/scripts/krb5/krb5-admin-server b/scripts/krb5/krb5-admin-server
new file mode 100644
index 0000000..af26121
--- /dev/null
+++ b/scripts/krb5/krb5-admin-server
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/kadmind
+RUNLEVEL=3
+NEEDS="+remote_fs +network krb5-kdc"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/krb5/krb5-kdc b/scripts/krb5/krb5-kdc
new file mode 100644
index 0000000..57c1b09
--- /dev/null
+++ b/scripts/krb5/krb5-kdc
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/krb5kdc
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/lamp/lamp b/scripts/lamp/lamp
new file mode 100755
index 0000000..f7e7cae
--- /dev/null
+++ b/scripts/lamp/lamp
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+PROGRAM="/usr/sbin/lamp"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+PIDFILE=/var/run/lamp.pid
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting $NAME..."
+ if [ -e $PIDFILE ] ; then
+ echo "$NAME already running";
+ else
+ $PROGRAM &>/dev/null &
+ pidof $PROGRAM > $PIDFILE;
+ fi
+
+}
+
+stop() {
+ echo "Stopping $NAME..."
+ if [ -e $PIDFILE ] ; then
+ PID=`cat $PIDFILE`
+ kill -9 $PID && rm -f $PIDFILE ;
+ else
+ echo "$NAME not running";
+ fi
+}
diff --git a/scripts/laptop-mode-tools/laptop-mode
b/scripts/laptop-mode-tools/laptop-mode
new file mode 100755
index 0000000..b177ca5
--- /dev/null
+++ b/scripts/laptop-mode-tools/laptop-mode
@@ -0,0 +1,118 @@
+#!/bin/sh
+#
+# chkconfig: - 20 90
+# description: Starts and stops "laptop-mode" - tweaks system behavior
+# to extend battery life.
+#
+# config: /etc/laptop-mode/laptop-mode.conf
+
+PROGRAM=/usr/sbin/laptop_mode
+RUNLEVEL=3
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+
+test -f /usr/sbin/laptop_mode || exit 0
+
+# Enable laptop mode when the system is booted when running on battery.
+
+function start() {
+ TEMPFILE=`mktemp`
+
+ mkdir -p /var/run/laptop-mode-tools
+ touch /var/run/laptop-mode-tools/enabled
+ if ($PROGRAM auto > $TEMPFILE) ; then
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.info -- "$(cat $TEMPFILE)"
+ else
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.notice -- "$(cat $TEMPFILE)"
+ fi
+
+ if [ -f $TEMPFILE ] ; then
+ rm $TEMPFILE
+ fi
+}
+
+function restart() {
+ TEMPFILE=`mktemp`
+
+ # Full restart: first stop laptop mode completely (to restore default
mount options etc.)
+ mkdir -p /var/run/laptop-mode-tools
+ rm -f /var/run/laptop-mode-tools/enabled
+ if ($PROGRAM stop > $TEMPFILE) ; then
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.info -- "$(cat $TEMPFILE)"
+ else
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.notice -- "$(cat $TEMPFILE)"
+ fi
+
+ # Now remove files containing stored status, re-enable, and start it up
again.
+ rm -f /var/run/laptop-mode-tools/*
+ touch /var/run/laptop-mode-tools/enabled
+ if ($PROGRAM auto force > $TEMPFILE) ; then
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.info -- "$(cat $TEMPFILE)"
+ else
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.notice -- "$(cat $TEMPFILE)"
+ fi
+
+ if [ -f $TEMPFILE ] ; then
+ rm $TEMPFILE
+ fi
+}
+
+function reload() {
+ TEMPFILE=`mktemp`
+
+ # Full restart: first stop laptop mode completely (to restore default
mount options etc.)
+ mkdir -p /var/run/laptop-mode-tools
+ rm -f /var/run/laptop-mode-tools/enabled
+ if ($PROGRAM stop > $TEMPFILE) ; then
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.info -- "$(cat $TEMPFILE)"
+ else
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.notice -- "$(cat $TEMPFILE)"
+ fi
+
+ # Now remove files containing stored status, re-enable, and start it up
again.
+ rm -f /var/run/laptop-mode-tools/*
+ touch /var/run/laptop-mode-tools/enabled
+ if ($PROGRAM auto force > $TEMPFILE) ; then
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.info -- "$(cat $TEMPFILE)"
+ else
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.notice -- "$(cat $TEMPFILE)"
+ fi
+
+ if [ -f $TEMPFILE ] ; then
+ rm $TEMPFILE
+ fi
+}
+
+function stop() {
+ TEMPFILE=`mktemp`
+
+ rm -f /var/run/laptop-mode-tools/enabled
+ if ($PROGRAM stop > $TEMPFILE) ; then
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.info -- "$(cat $TEMPFILE)"
+ else
+ cat $TEMPFILE
+ logger -t LAPTOP-MODE -p daemon.notice -- "$(cat $TEMPFILE)"
+ fi
+
+ if [ -f $TEMPFILE ] ; then
+ rm $TEMPFILE
+ fi
+}
+
+function status() {
+ echo "Laptop mode status:"
+ echo
+ $PROGRAM status
+}
diff --git a/scripts/lcdproc/LCDd b/scripts/lcdproc/LCDd
new file mode 100644
index 0000000..422b685
--- /dev/null
+++ b/scripts/lcdproc/LCDd
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/LCDd
+
+PROGRAM=/usr/sbin/LCDd
+ARGS="-d $LCD_DRIVERS"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/lcdproc/LCDd.conf b/scripts/lcdproc/LCDd.conf
new file mode 100644
index 0000000..d998ce5
--- /dev/null
+++ b/scripts/lcdproc/LCDd.conf
@@ -0,0 +1,2 @@
+# LCD driver (CFontz, curses, HD44780, irmanin, joy, MtxOrb, LB216, test)
+LCD_DRIVERS=CFontz
diff --git a/scripts/libnetswitch/netswitch b/scripts/libnetswitch/netswitch
new file mode 100644
index 0000000..efe5a0c
--- /dev/null
+++ b/scripts/libnetswitch/netswitch
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/netswitch
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+start() {
+ # Find the profile to activate from Kernel command line
+ PROFILE=`cat /proc/cmdline|sed 's/.*netswitch=\([^ ]*\).*/\1/'`
+ if [ -n "`netswitch list|grep \"$PROFILE\"`" ]; then
+ loadproc $PROGRAM profile on $PROFILE
+ evaluate_retval
+ fi
+}
+
+stop() {
+ loadproc $PROGRAM profile off
+ evaluate_retval
+}
+
+restart() {
+ echo "Restarting netswitch..."
+ if [ -f $PIDFILE ]; then
+ $0 stop
+ sleep 2
+ fi
+ $0 start
+}
+
+status() { exit 3; }
+
+reload() { exit 3; }
+force_reload() { exit 3; }
+
+usage() {
+ echo "Usage: $0 {start|stop|restart|status}"
+}
diff --git a/scripts/libvirt/libvirtd b/scripts/libvirt/libvirtd
new file mode 100644
index 0000000..979dc9b
--- /dev/null
+++ b/scripts/libvirt/libvirtd
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PIDFILE=/var/run/libvirtd.pid
+PROGRAM=/usr/sbin/libvirtd
+ARGS="-d"
+RUNLEVEL=3
+
+[[ ! -d /var/run/libvirt ]] && mkdir -p /var/run/libvirt
+
+. /etc/init.d/smgl_init
diff --git a/scripts/lighttpd/lighttpd b/scripts/lighttpd/lighttpd
new file mode 100644
index 0000000..033b193
--- /dev/null
+++ b/scripts/lighttpd/lighttpd
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PIDFILE=/var/run/lighttpd.pid
+PROGRAM=/usr/sbin/lighttpd
+ARGS="-f /etc/lighttpd.conf"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/linux-initrd/bootsplash b/scripts/linux-initrd/bootsplash
new file mode 100755
index 0000000..bd2b76b
--- /dev/null
+++ b/scripts/linux-initrd/bootsplash
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+. /etc/sysconfig/bootsplash
+
+PROGRAM=/sbin/splash
+RUNLEVEL=S
+NEEDS=""
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ if [ -e /proc/splash ] ; then
+ for NUM in 1 2 3 4 5 6
+ do
+ if [ -n "${TTY_CFG[$NUM]}" ]; then
+ echo "Setting theme ${TTY_CFG[$NUM]} on TTY $NUM"
+ $PROGRAM -s -u $(($NUM - 1)) ${TTY_CFG[$NUM]}
+ evaluate_retval
+ fi
+ done
+ fi
+}
+
+stop()
+{
+#nothing to do here...
+return
+}
+
+status()
+{
+for NUM in 1 2 3 4 5 6
+do
+ if [ -n "${TTY_CFG[$NUM]}" ]; then
+ echo "Theme ${TTY_CFG[$NUM]} on TTY $NUM"
+ else
+ echo "No theme set up on TTY $NUM"
+ fi
+done
+}
diff --git a/scripts/linux-initrd/bootsplash.conf
b/scripts/linux-initrd/bootsplash.conf
new file mode 100644
index 0000000..fa6d82f
--- /dev/null
+++ b/scripts/linux-initrd/bootsplash.conf
@@ -0,0 +1,13 @@
+#Config file for bootsplash
+#syntax is TTY_CFG[1]="PATH_TO_CONFIG_FILE"
+#for example,
TTY_CFG[1]="/etc/bootsplash/themes/SMGL/config/bootsplash-1024x768.cfg" will
set up Sourcemage theme on tty1
+
+THEME="SMGL"
+RES=$(fbresolution)
+NAME=bootsplash
+TTY_CFG[1]="/etc/bootsplash/themes/$THEME/config/$NAME-$RES.cfg"
+TTY_CFG[2]="/etc/bootsplash/themes/$THEME/config/$NAME-$RES.cfg"
+TTY_CFG[3]="/etc/bootsplash/themes/$THEME/config/$NAME-$RES.cfg"
+TTY_CFG[4]="/etc/bootsplash/themes/$THEME/config/$NAME-$RES.cfg"
+TTY_CFG[5]="/etc/bootsplash/themes/$THEME/config/$NAME-$RES.cfg"
+TTY_CFG[6]="/etc/bootsplash/themes/$THEME/config/$NAME-$RES.cfg"
diff --git a/scripts/linux-wlan-ng/wlan b/scripts/linux-wlan-ng/wlan
new file mode 100755
index 0000000..bf8a89f
--- /dev/null
+++ b/scripts/linux-wlan-ng/wlan
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+# description: Activates/Configures/Disables wlan devices
+
+source /etc/init.d/smgl_functions
+
+required_executable /sbin/ifconfig
+required_executable /sbin/modprobe
+
+PROGRAM=/bin/false
+#ARGS="/etc/...."
+RUNLEVEL=3
+#NEEDS="+network"
+PROVIDES=network
+
+. /etc/wlan/shared
+
+
+action=$1
+
+case "$action" in
+
+start)
+ # This will implicitly fire off wland via hotplug.
+ echo -n "Starting WLAN Devices: "
+ if ! $MODPROBE p80211; then
+ evaluate_retval
+# echo "Failed to load p80211.o."
+ exit 1
+ fi
+
+ # NOTE: We don't explicitly insmod the card driver here. The
+ # best thing to do is to specify an alias in /etc/modules.conf.
+
+ for DEVICE in $WLAN_DEVICES; do
+ $MODPROBE $DEVICE
+ # if we don't have hotplug.. do things the old-fashioned way.
+ if [ $HAS_HOTPLUG = 'n' ] ; then
+ wlan_bring_it_up $DEVICE
+ fi
+ done
+
+ # And hotplug will take care of the rest, namely device
+ # initialization and whatnot.
+
+ evaluate_retval
+ ;;
+
+stop)
+ echo -n "Shutting Down WLAN Devices: "
+ # Do a reset on each device to make sure none of them are still
+ # trying to generate interrupts.
+ for DEVICE in $WLAN_DEVICES; do
+ wlan_disable $DEVICE
+ ifconfig $DEVICE down
+ $MODPROBE -r $DEVICE
+ done
+
+ # remove p80211, which will implictly kill wland.
+ $MODPROBE -r p80211
+ evaluate_retval
+ ;;
+
+status)
+ status wland
+ ;;
+
+restart|reload|force-reload)
+ $0 stop
+ $0 start
+ evaluate_retval
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|status|restart|reload|force-reload}"
+ ;;
+
+esac
+
diff --git a/scripts/lisa/lisa b/scripts/lisa/lisa
new file mode 100755
index 0000000..17829e5
--- /dev/null
+++ b/scripts/lisa/lisa
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/lisa
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/lisa
+
+ARGS="--config=$CONFIG --port $PORT"
+
+start()
+{
+ echo "Starting $NAME..." &&
+ #
+ # LISa is not quiet on output...
+ #
+ loadproc $PROGRAM $ARGS > /dev/null &&
+ evaluate_retval
+}
diff --git a/scripts/lisa/lisa.conf b/scripts/lisa/lisa.conf
new file mode 100644
index 0000000..df3caaf
--- /dev/null
+++ b/scripts/lisa/lisa.conf
@@ -0,0 +1,9 @@
+#
+# Default config file (used by kdenetwork)
+#
+CONFIG=/etc/lisarc
+
+#
+# Default port 7741
+#
+PORT=7741
diff --git a/scripts/lm_sensors/lm_sensors b/scripts/lm_sensors/lm_sensors
new file mode 100755
index 0000000..cff2905
--- /dev/null
+++ b/scripts/lm_sensors/lm_sensors
@@ -0,0 +1,52 @@
+#!/bin/bash
+# description: sensors is used for monitoring motherboard sensor values.
+# See also the lm_sensors homepage at:
+# http://www2.lm-sensors.nu/~lm78/index.html
+# This uses /etc/sysconfig/sensors that contains the modules to
+# be loaded/unloaded. /etc/sysconfig/sensors is written by sensors-detect.
+# /etc/modules.conf also needs to be updated before using this script.
+#
+# SMGL-script-version=20030224
+# no symlinks are made for this one, must do it by hand!
+
+NEEDS="+remote_fs"
+PROGRAM=/usr/bin/sensors
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+CONFIG=/etc/sysconfig/lm_sensors
+MODULES=`grep \^MODULE_ $CONFIG | cut -d= -f2`
+
+start()
+{
+ for i in $MODULES; do
+ echo "Starting hardware sensor $i ..."
+ modprobe $i 2>&1 >/dev/null
+ evaluate_retval
+ done
+ echo "Starting sensors ..."
+ ${PROGRAM} -s > /dev/null
+ evaluate_retval
+}
+
+stop()
+{
+ for i in $MODULES; do
+ echo "Stopping hardware sensor $i ..."
+ modprobe -r $i 2>&1 >/dev/null
+ evaluate_retval
+ done
+}
+
+restart()
+{
+ stop &&
+ sleep 1 &&
+ start
+}
+
+status()
+{
+ ${PROGRAM}
+}
diff --git a/scripts/logitech_applet/logitech_applet
b/scripts/logitech_applet/logitech_applet
new file mode 100755
index 0000000..972acef
--- /dev/null
+++ b/scripts/logitech_applet/logitech_applet
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+. /etc/sysconfig/logitech_applet
+
+NAME="Logitech applet"
+PROGRAM=/usr/bin/logitech_applet
+ARGS=$LA_ARGS
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+stop()
+{
+ return 0;
+}
+
diff --git a/scripts/logitech_applet/logitech_applet.conf
b/scripts/logitech_applet/logitech_applet.conf
new file mode 100644
index 0000000..09c2f8e
--- /dev/null
+++ b/scripts/logitech_applet/logitech_applet.conf
@@ -0,0 +1,7 @@
+# parameters:
+#
+# --set-res=X set the sensor resolution to X, where X is 400 or 800 maybe
1200 or 1600
+# --enable-cc enable Cruise Control
+# --disable-cc disable Cruise Control
+#
+LA_ARGS="--set-res=800 --disable-cc"
diff --git a/scripts/loop-aes/loop-aes.conf b/scripts/loop-aes/loop-aes.conf
new file mode 100644
index 0000000..40dc6be
--- /dev/null
+++ b/scripts/loop-aes/loop-aes.conf
@@ -0,0 +1,7 @@
+# example script for loop-AES configuration to automount the partitions,
README will help you to figure this out
+# (uncomment and edit the lines starting with `echo')
+#
+# passphrase algo key
loop device physical device
+
+#echo -n "Pd1eXapMJk0XAJnNSIzE" | losetup -p 0 -e aes256 -K /etc/swapkey.gpg
/dev/loop6 /dev/hda5
+#echo -n "D0aZNSNnu6FdAph+zrHt" | losetup -p 0 -e aes256 -K /etc/homekey.gpg
/dev/loop4 /dev/sdd6
diff --git a/scripts/loop-aes/losetup b/scripts/loop-aes/losetup
new file mode 100755
index 0000000..a6a21ea
--- /dev/null
+++ b/scripts/loop-aes/losetup
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+NEEDS="+root_fs"
+PROVIDES=crypt_fs
+RUNLEVEL=S
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Linking encrypted partitions..."
+ . /etc/sysconfig/loop-aes
+}
+
+stop()
+{
+ echo "Cannot unlink encrypted partitions"
+}
+
+usage()
+{
+ echo "Usage: start|stop"
+}
diff --git a/scripts/lsh/lshd b/scripts/lsh/lshd
new file mode 100755
index 0000000..67b88ae
--- /dev/null
+++ b/scripts/lsh/lshd
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/lshd
+ARGS="--daemonic"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/lshwd/lshwd b/scripts/lshwd/lshwd
new file mode 100755
index 0000000..4e0af39
--- /dev/null
+++ b/scripts/lshwd/lshwd
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+PROGRAM=/bin/true
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+# source function library
+. /etc/init.d/smgl_init
+
+
+start(){
+ echo "Autodetecting Hardware with lshwd"
+ lshwd -a >/dev/null
+ if [ $? -gt 0 ]; then
+ echo "FAIL"
+ else
+ echo "DONE"
+ fi
+}
+
+
+
+stop(){
+ /sbin/true
+ echo "lshwd stopped"
+}
+
+restart(){
+ stop
+ start
+}
+
diff --git a/scripts/mailman/mailman b/scripts/mailman/mailman
new file mode 100755
index 0000000..46cdb09
--- /dev/null
+++ b/scripts/mailman/mailman
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+PROGRAM="/bin/false"
+
+. /etc/init.d/smgl_init
+
+PYTHON=/usr/bin/python
+MAILMANHOME=/usr/share/mailman
+MAILMANCTL=$MAILMANHOME/bin/mailmanctl
+
+start() {
+ echo "Starting Mailman..."
+ $PYTHON $MAILMANCTL -s -q start
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping Mailman..."
+ $PYTHON $MAILMANCTL -q stop
+ evaluate_retval
+}
+
+restart() {
+ echo "Restarting Mailman..."
+ $PYTHON $MAILMANCTL -q restart
+ evaluate_retval
+}
diff --git a/scripts/maradns/maradns b/scripts/maradns/maradns
new file mode 100644
index 0000000..719dec1
--- /dev/null
+++ b/scripts/maradns/maradns
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+PROGRAM="/usr/sbin/maradns"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+required_executable /usr/sbin/maradns
+required_executable /usr/bin/duende
+
+function start()
+{
+ echo "Starting maradns..."
+ /usr/bin/duende maradns
+ evaluate_retval
+}
+
+function stop()
+{
+ echo "Stoping maradns..."
+ pkill maradns
+ evaluate_retval
+}
+
diff --git a/scripts/maradns/zoneserver b/scripts/maradns/zoneserver
new file mode 100644
index 0000000..05de247
--- /dev/null
+++ b/scripts/maradns/zoneserver
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+PROGRAM="/usr/sbin/zoneserver"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+required_executable /usr/sbin/maradns
+required_executable /usr/bin/duende
+
+function start()
+{
+ echo "Starting zoneserver..."
+ /usr/bin/duende zoneserver
+ evaluate_retval
+}
+
+function stop()
+{
+ echo "Stoping zoneserver..."
+ pkill zoneserver
+ evaluate_retval
+}
+
diff --git a/scripts/mcron/cron b/scripts/mcron/cron
new file mode 100644
index 0000000..8293492
--- /dev/null
+++ b/scripts/mcron/cron
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/cron
+ARGS="-n"
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
diff --git a/scripts/mcron/mcron b/scripts/mcron/mcron
new file mode 100644
index 0000000..7931833
--- /dev/null
+++ b/scripts/mcron/mcron
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/mcron
+ARGS="-d"
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
diff --git a/scripts/metalog/smgl-metalog b/scripts/metalog/smgl-metalog
new file mode 100755
index 0000000..6dd855f
--- /dev/null
+++ b/scripts/metalog/smgl-metalog
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PROGRAM=/sbin/metalog
+ARGS="--daemonize --sync"
+RUNLEVEL=S
+NEEDS="+local_fs"
+PROVIDES=syslog
+
+. /etc/init.d/smgl_init
diff --git a/scripts/mico/smgl-mico-nsd b/scripts/mico/smgl-mico-nsd
new file mode 100755
index 0000000..f798c89
--- /dev/null
+++ b/scripts/mico/smgl-mico-nsd
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+. /etc/sysconfig/smgl-mico-nsd
+
+PROGRAM=/usr/bin/nsd
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/nsd.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting mico nsd..."
+ $PROGRAM $ARGS &
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping mico nsd..." &&
+ killproc $PROGRAM &&
+ evaluate_retval
+}
+
+restart()
+{
+ stop &&
+ start
+}
diff --git a/scripts/mico/smgl-mico-nsd.conf b/scripts/mico/smgl-mico-nsd.conf
new file mode 100644
index 0000000..72df760
--- /dev/null
+++ b/scripts/mico/smgl-mico-nsd.conf
@@ -0,0 +1 @@
+ARGS="-ORBIIOPAddr inet:`uname -n`:micons"
diff --git a/scripts/microcode_ctl/microcode b/scripts/microcode_ctl/microcode
new file mode 100755
index 0000000..b24a5e5
--- /dev/null
+++ b/scripts/microcode_ctl/microcode
@@ -0,0 +1,68 @@
+#!/bin/bash
+# description: script to apply cpu microcode
+
+# PROGRAM the executable to run
+# ARGUMENTS the argument we're going to call PROGRAM with
+
+. /etc/init.d/smgl_init
+
+RUNLEVEL=1
+NEEDS="local_fs"
+PROGRAM=/usr/sbin/microcode_ctl
+
+DEVICE=/dev/cpu/microcode
+ARGUMENTS=-Qu
+
+# perform the update
+start () {
+
+ if [[ ! -e /dev/cpu ]]
+ then
+ DEVICE=/dev/misc/microcode
+ mkdir /dev/cpu
+ [[ -d /dev/cpu ]] && [[ ! -e /dev/cpu/microcode ]] && ln -s
/dev/misc/microcode /dev/cpu/microcode
+ fi
+
+ if [ ! -e $DEVICE ];
+ then
+ echo "$0: microcode device $DEVICE doesn't exist?"
+ exit 1
+ fi
+
+ # need intel CPU check
+ echo "Applying Intel IA32 Microcode update... "
+
+ $START $PROGRAM $ARGUMENTS
+
+ # trap the most common case, errno 19 = no device
+ if [ $? -eq 19 ];
+ then
+ grep MICROCODE /usr/include/linux/autoconf.h | grep -q
^#define
+ if [ $? -ne 0 ];
+ then
+ echo "$0: This kernel doesn't appear to have
microcode device support?"
+ fi
+ fi
+ echo
+}
+
+stop()
+{
+ exit 0
+}
+
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+
+status() {
+ # I wonder when the driver will let us do this...
+ # maybe I'll write it ;)
+ echo "$0: reading microcode status is not yet supported"
+ exit 3;
+}
+
+usage()
+{
+ echo "$0 usage: microcode {start|restart}"
+}
diff --git a/scripts/micron/micron b/scripts/micron/micron
new file mode 100755
index 0000000..591ea6f
--- /dev/null
+++ b/scripts/micron/micron
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/micrond
+RUNLEVEL=3
+PIDFILE=/var/run/crond.pid
+
+. /etc/init.d/smgl_init
diff --git a/scripts/middleman/middleman b/scripts/middleman/middleman
new file mode 100644
index 0000000..cc7f325
--- /dev/null
+++ b/scripts/middleman/middleman
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/mman
+
+PROGRAM=/usr/bin/mman
+ARGS="-c /etc/mman.conf -l /var/log/mman -d $DEBUG_LEVEL"
+NEEDS="+network +remote_fs"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/middleman/mman.conf b/scripts/middleman/mman.conf
new file mode 100644
index 0000000..fa58fc9
--- /dev/null
+++ b/scripts/middleman/mman.conf
@@ -0,0 +1,2 @@
+# Run mman --help to see the different options available
+DEBUG_LEVEL=2047
diff --git a/scripts/module-init-tools/modutils
b/scripts/module-init-tools/modutils
new file mode 100644
index 0000000..e7e6dd4
--- /dev/null
+++ b/scripts/module-init-tools/modutils
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+RUNLEVEL=S
+PROVIDES=modules
+NEEDS="+root_fs"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/modutils
+
+test -x /sbin/depmod || exit 5
+test -x /sbin/modprobe || exit 5
+
+case $1 in
+ start) ;; # Fall through
+ stop) exit 0 ;;
+ *) echo "Usage: $0 {start|stop}"
+ exit 1
+ ;;
+esac
+
+# Handle start action
+
+if [ -x /sbin/depmod ] && [ "$PERFORM_DEPMOD" = "y" ] ; then
+ if [ "$ENABLE_SWAP_BEFORE_DEPMOD" = "y" ] ; then
+ echo "Enabling swap..."
+ loadproc swapon -a
+ fi
+ echo "Running depmod..."
+ loadproc depmod -a
+fi
+
+if [ -e /etc/modules ] && [ -x /sbin/modprobe ] ; then
+ ( cat /etc/modules; builtin echo ) |
+ while read MODULE ARGS; do
+ case $MODULE in
+ \#*|"") continue ;;
+ esac
+ echo "Loading module $MODULE..."
+ loadproc modprobe $MODULE $ARGS
+ done
+fi
diff --git a/scripts/module-init-tools/modutils.conf
b/scripts/module-init-tools/modutils.conf
new file mode 100644
index 0000000..e903eb0
--- /dev/null
+++ b/scripts/module-init-tools/modutils.conf
@@ -0,0 +1,8 @@
+# Perform depmod -a on boot or not.
+# Probably don't want to do this if you are on a laptop and running on
battery.
+PERFORM_DEPMOD=y
+
+# Sometimes low memory machines and with kernels with lots of modules depmod
+# will cause an Out Of Memory (oom) kernel panic. Say yes here if you want to
+# enable swap so the oom error won't happen.
+#ENABLE_SWAP_BEFORE_DEPMOD=y
diff --git a/scripts/modutils/modutils b/scripts/modutils/modutils
new file mode 100644
index 0000000..9baef3b
--- /dev/null
+++ b/scripts/modutils/modutils
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+
+test -x /sbin/depmod || exit 5
+test -x /sbin/modprobe || exit 5
+
+case $1 in
+ start) ;; # Fall through
+ stop) exit 0 ;;
+ *) echo "Usage: $0 {start|stop}"
+ exit 1
+ ;;
+esac
+
+# Handle start action
+
+if [ -x /sbin/depmod ]; then
+ echo "Running depmod..."
+ loadproc depmod -a
+fi
+
+if [ -e /etc/modules ] && [ -x /sbin/modprobe ] ; then
+ ( cat /etc/modules; builtin echo ) |
+ while read MODULE ARGS; do
+ case $MODULE in
+ \#*|"") continue ;;
+ esac
+ echo "Loading module $MODULE..."
+ loadproc modprobe $MODULE $ARGS
+ done
+fi
diff --git a/scripts/mono/mono b/scripts/mono/mono
new file mode 100644
index 0000000..a3df039
--- /dev/null
+++ b/scripts/mono/mono
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/mono
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting mono..." &&
+ if [ -e /proc/sys/fs/binfmt_misc/DOSWin ]; then
+ echo ".Net and Windows executables have the same magic number" &&
+ echo "so they cannot both be set for binfmt_misc." &&
+ echo "mono not loaded." &&
+ return 1
+ fi &&
+
+ # From /usr/src/linux/Documentation/mono.txt
+ # Insert BINFMT_MISC module into the kernel if it's not loaded
+ if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then
+ /sbin/modprobe binfmt_misc
+ mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
+ fi &&
+
+ # Register support for .Net CLR binaries
+ if [ -e /proc/sys/fs/binfmt_misc/register ]; then
+ builtin echo ':CLR:M::MZ::/usr/bin/mono:' \
+ > /proc/sys/fs/binfmt_misc/register
+ else
+ echo "No binfmt_misc support" &&
+ return 1
+ fi
+}
+
+stop()
+{
+ echo "Stopping mono..." &&
+
+ if [ -e /proc/sys/fs/binfmt_misc/CLR ]; then
+ # Send both 0 and -1 in case removing doesn't disable...
+ # Disable wine
+ builtin echo '0' > /proc/sys/fs/binfmt_misc/CLR &&
+ # Remove wine
+ builtin echo '-1' > /proc/sys/fs/binfmt_misc/CLR
+ fi
+}
+
+restart()
+{
+ echo "Restarting mono..." &&
+ stop &&
+ start
+}
diff --git a/scripts/mpd/mpd b/scripts/mpd/mpd
new file mode 100644
index 0000000..55030b5
--- /dev/null
+++ b/scripts/mpd/mpd
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/mpd
+ARGS=""
+RUNLEVEL=3
+NEEDS=""
+MPD_DB="$(grep music_directory /etc/sysconfig/mpd | cut -d \" -f 2)/mpd.db"
+
+[[ -z $MPD_DB ]] && ARGS="$ARGS --create-db"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/mpd/mpd.conf b/scripts/mpd/mpd.conf
new file mode 100644
index 0000000..2f6d22a
--- /dev/null
+++ b/scripts/mpd/mpd.conf
@@ -0,0 +1,245 @@
+# An example configuration file for MPD
+# See the mpd.conf man page for a more detailed description of each
parameter.
+
+######################## REQUIRED PATHS ########################
+music_directory "/var/lib/mpd/music"
+playlist_directory "/var/lib/mpd/playlists"
+db_file "/var/lib/mpd/mpd.db"
+log_file "/var/log/mpd.log"
+error_file "/var/log/mpd.error"
+################################################################
+
+
+######################## OPTIONAL PATHS ########################
+#
+# If you wish to use mpd --kill to stop MPD, then you must
+# specify a file here in which to store MPD's process ID.
+#
+#pid_file "~/.mpd/mpd.pid"
+#
+# If specified, MPD will save its current state (playlist,
+# current song, playing/paused, etc.) at exit. This will be
+# used to restore the session the next time it is run.
+#
+#state_file "~/.mpd/mpdstate"
+#
+################################################################
+
+
+######################## DAEMON OPTIONS ########################
+#
+# If started as root, MPD will drop root privileges and run as
+# this user instead. Otherwise, MPD will run as the user it was
+# started by. If left unspecified, MPD will not drop root
+# privileges at all (not recommended).
+#
+user "musicdaemon"
+#
+# The address and port to listen on.
+#
+bind_to_address "any"
+port "6600"
+#
+# Controls the amount of information that is logged. Can be
+# "default", "secure", or "verbose".
+#
+log_level "default"
+#
+################################################################
+
+
+########################## PERMISSIONS #########################
+#
+# MPD can require that users specify a password before using it.
+# You may specify one ore more here, along with what users who
+# log in with that password are allowed to do.
+#
+#password "password@read,add,control,admin"
+#
+# Specifies what permissions a user who has not logged in with a
+# password has. By default, all users have full access to MPD
+# if no password is specified above, or no access if one or
+# more passwords are specified.
+#
+#default_permissions "read,add,control,admin"
+#
+################################################################
+
+
+########################## AUDIO OUTPUT ########################
+#
+# MPD supports many audio output types, as well as playing
+# through multiple audio outputs at the same time. You can
+# specify one or more here. If you don't specify any, MPD will
+# automatically scan for a usable audio output.
+#
+# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs>
+# for examples of other audio outputs.
+#
+# An example of an ALSA output:
+#
+#audio_output {
+# type "alsa"
+# name "My ALSA Device"
+# device "hw:0,0" # optional
+# format "44100:16:2" # optional
+#}
+#
+# An example of an OSS output:
+#
+#audio_output {
+# type "oss"
+# name "My OSS Device"
+# device "/dev/dsp" # optional
+# format "44100:16:2" # optional
+#}
+#
+# An example of a shout output (for streaming to Icecast):
+#
+#audio_output {
+# type "shout"
+# name "My Shout Stream"
+# host "localhost"
+# port "8000"
+# mount "/mpd.ogg"
+# password "hackme"
+# quality "5.0"
+# bitrate "128"
+# format "44100:16:1"
+# user "source" # optional
+# description "My Stream Description" # optional
+# genre "jazz" # optional
+# public "no" # optional
+#}
+#
+# Force all decoded audio to be converted to this format before
+# being passed to the audio outputs.
+#
+#audio_output_format "44100:16:2"
+#
+################################################################
+
+
+############################# MIXER ############################
+#
+# MPD needs to know what mixer settings to change when you
+# adjust the volume. If you don't specify one here, MPD will
+# pick one based on which ones it was compiled with support for.
+#
+# An example for controlling an ALSA mixer:
+#
+#mixer_type "alsa"
+#mixer_device "default"
+#mixer_control "PCM"
+#
+# An example for controlling an OSS mixer:
+#
+#mixer_type "oss"
+#mixer_device "/dev/mixer"
+#mixer_control "PCM"
+#
+# If you want MPD to adjust the volume of audio sent to the
+# audio outputs, you can tell it to use the software mixer:
+#
+#mixer_type "software"
+#
+################################################################
+
+
+######################### NORMALIZATION ########################
+#
+# Specifies the type of ReplayGain to use. Can be "album" or
+# "track". ReplayGain will not be used if not specified. See
+# <http://www.replaygain.org> for more details.
+#
+#replaygain "album"
+#
+# Sets the pre-amp used for files that have ReplayGain tags.
+#
+#replaygain_preamp "0"
+#
+# Enable on the fly volume normalization. This will cause the
+# volume of all songs played to be adjusted so that they sound
+# as though they are of equal loudness.
+#
+#volume_normalization "no"
+#
+################################################################
+
+
+########################### BUFFERING ##########################
+#
+# The size of the buffer containing decoded audio. You probably
+# shouldn't change this.
+#
+#audio_buffer_size "2048"
+#
+# How much of the buffer to fill before beginning to play.
+#
+#buffer_before_play "0%"
+#
+# Similar options for the HTTP stream buffer. If you hear
+# skipping while playing HTTP streams, you may wish to increase
+# these.
+#
+#http_buffer_size "128"
+#http_prebuffer_size "25%"
+#
+################################################################
+
+
+########################### HTTP PROXY #########################
+#
+# Specifies the HTTP proxy to use for playing HTTP streams.
+#
+#http_proxy_host "proxy.isp.com"
+#http_proxy_port "8080"
+#http_proxy_user "user"
+#http_proxy_password "password"
+#
+################################################################
+
+
+############################# LIMITS ###########################
+#
+# These are various limits to prevent MPD from using too many
+# resources. You should only change them if they start
+# restricting your usage of MPD.
+#
+#connection_timeout "60"
+#max_connections "5"
+#max_playlist_length "16384"
+#max_command_list_size "2048"
+#max_output_buffer_size "8192"
+#
+################################################################
+
+
+###################### CHARACTER ENCODINGS #####################
+#
+# If file or directory names do not display correctly, then you
+# may need to change this. In most cases it should be either
+# "ISO-8859-1" or "UTF-8". You must recreate your database
+# after changing this (use mpd --create-db).
+#
+#filesystem_charset "ISO-8859-1"
+#
+# The encoding that ID3v1 tags should be converted from.
+#
+#id3v1_encoding "ISO-8859-1"
+#
+################################################################
+
+
+######################### OTHER OPTIONS ########################
+#
+# The metadata types MPD will recognize.
+#
+#metadata_to_use
"artist,album,title,track,name,genre,date,composer,performer,disc"
+#
+# Enable this if you wish to use your MPD created playlists in
+# other music players.
+#
+#save_absolute_paths_in_playlists "no"
+#
+################################################################
diff --git a/scripts/mysql/mysql b/scripts/mysql/mysql
new file mode 100644
index 0000000..a04bede
--- /dev/null
+++ b/scripts/mysql/mysql
@@ -0,0 +1,183 @@
+#!/bin/sh
+# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
+# This file is public domain and comes with NO WARRANTY of any kind
+#
+# If you install MySQL on some other places than /usr, then you
+# have to do one of the following things for this script to work:
+#
+# - Run this script from within the MySQL installation directory
+# - Create a /etc/my.cnf file with the following information:
+# [mysqld]
+# basedir=<path-to-mysql-installation-directory>
+# - Add the above to any other configuration file (for example ~/.my.ini)
+# and copy my_print_defaults to /usr/bin
+# - Add the path to the mysql-installation-directory to the basedir variable
+# below.
+#
+# If you want to affect other MySQL variables, you should make your changes
+# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
+#
+# SMGL-script-version=20030723
+# SMGL-START:3 4 5:S90
+# SMGL-STOP:0 1 2 6:K10
+
+PROGRAM=
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+basedir=
+
+# The following variables are only set for letting mysql.server find things.
+
+# Set some defaults
+datadir=/var/lib/mysql
+pid_file=
+if test -z "$basedir"
+then
+ basedir=/usr
+ bindir=/usr/bin
+else
+ bindir="$basedir/bin"
+fi
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
+export PATH
+
+if test -z "$pid_file"
+then
+ pid_file=$datadir/`/bin/hostname`.pid
+else
+ case "$pid_file" in
+ /* ) ;;
+ * ) pid_file="$datadir/$pid_file" ;;
+ esac
+fi
+
+mode=$1 # start or stop
+
+parse_arguments() {
+ for arg do
+ case "$arg" in
+ --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ esac
+ done
+}
+
+# Get arguments from the my.cnf file,
+# groups [mysqld] [mysql_server] and [mysql.server]
+if test -x ./bin/my_print_defaults
+then
+ print_defaults="./bin/my_print_defaults"
+elif test -x $bindir/my_print_defaults
+then
+ print_defaults="$bindir/my_print_defaults"
+elif test -x $bindir/mysql_print_defaults
+then
+ print_defaults="$bindir/mysql_print_defaults"
+else
+ # Try to find basedir in /etc/my.cnf
+ conf=/etc/my.cnf
+ print_defaults=
+ if test -r $conf
+ then
+ subpat='^[^=]*basedir[^=]*=\(.*\)$'
+ dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf`
+ for d in $dirs
+ do
+ d=`echo $d | sed -e 's/[ ]//g'`
+ if test -x "$d/bin/my_print_defaults"
+ then
+ print_defaults="$d/bin/my_print_defaults"
+ break
+ fi
+ if test -x "$d/bin/mysql_print_defaults"
+ then
+ print_defaults="$d/bin/mysql_print_defaults"
+ break
+ fi
+ done
+ fi
+
+ # Hope it's in the PATH ... but I doubt it
+ test -z "$print_defaults" && print_defaults="my_print_defaults"
+fi
+
+parse_arguments `$print_defaults mysqld mysql_server mysql.server`
+
+# Safeguard (relative paths, core dumps..)
+cd $basedir
+
+case "$mode" in
+ 'start')
+ # Start daemon
+
+ if test -x $bindir/mysqld_safe
+ then
+ # Give extra arguments to mysqld with the my.cnf file. This script may
+ # be overwritten at next upgrade.
+ echo "Starting mysqld_safe..."
+ iter=0
+ ( unset -f echo
+ $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file 2>&1 >
/dev/null ) &
+ while [ ! -e $pid_file ] && [ $((iter++)) -lt 10 ] ; do sleep 1; echo
-n . ; done
+ [ $((iter++)) -lt 11 ]
+ evaluate_retval
+ # Make lock for RedHat / SuSE
+ if test -w /var/lock/subsys
+ then
+ touch /var/lock/subsys/mysql
+ fi
+ else
+ echo "Can't execute $bindir/mysqld_safe from dir $basedir"
+ fi
+ evaluate_retval
+ ;;
+
+ 'stop')
+ # Stop daemon. We use a signal here to avoid having to know the
+ # root password.
+ if test -s "$pid_file"
+ then
+ mysqld_pid=`cat $pid_file`
+ echo "Killing mysqld with pid $mysqld_pid"
+ kill $mysqld_pid
+ # mysqld should remove the pid_file when it exits, so wait for it.
+
+ sleep 1
+ while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
]
+ do
+ [ -z "$flags" ] && echo -n "Wait for mysqld to exit" || echo -n "."
+ flags=a$flags
+ sleep 1
+ done
+ if [ -s $pid_file ]
+ then echo " gave up waiting!"
+ elif [ -n "$flags" ]
+ then echo " done"
+ fi
+ # delete lock for RedHat / SuSE
+ if test -f /var/lock/subsys/mysql
+ then
+ rm /var/lock/subsys/mysql
+ fi
+ else
+ echo "No mysqld pid file found. Looked for $pid_file."
+ fi
+ evaluate_retval
+ ;;
+ 'restart')
+ echo "Restarting mysql server"
+ $0 stop
+ $0 start
+ evaluate_retval
+ ;;
+ *)
+ # usage
+ echo "usage: $0 start|stop|restart"
+ exit 1
+ ;;
+esac
diff --git a/scripts/mythtv/mythtv.conf b/scripts/mythtv/mythtv.conf
new file mode 100644
index 0000000..a070fec
--- /dev/null
+++ b/scripts/mythtv/mythtv.conf
@@ -0,0 +1,4 @@
+# /etc/sysconfig/mythtv
+
+# location of logfile
+MYTH_LOGFILE=/var/log/mythbackend.log
diff --git a/scripts/mythtv/smgl-mythbackend b/scripts/mythtv/smgl-mythbackend
new file mode 100644
index 0000000..0476982
--- /dev/null
+++ b/scripts/mythtv/smgl-mythbackend
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+. /etc/sysconfig/mythtv
+
+PROGRAM=/usr/bin/mythbackend
+PIDFILE=/var/run/mythbackend.pid
+ARGS="-d -l $MYTH_LOGFILE -p $PIDFILE"
+RUNLEVEL=3
+NEEDS="+remote_fs mysql"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/nagios/nagios b/scripts/nagios/nagios
new file mode 100755
index 0000000..587d651
--- /dev/null
+++ b/scripts/nagios/nagios
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+PIDFILE=/var/run/nagios/nagios.pid
+PROGRAM=/usr/bin/nagios
+ARGS="-d /etc/nagios/nagios.cfg"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+function start()
+{
+ mkdir -p /var/run/nagios
+ mkdir -p /var/lock/nagios
+ chown nagios:nagios /var/run/nagios
+ chown nagios:nagios /var/lock/nagios
+ echo "Starting $NAME..."
+ loadproc $PROGRAM $ARGS
+}
diff --git a/scripts/nas/nasd b/scripts/nas/nasd
new file mode 100755
index 0000000..baee4b6
--- /dev/null
+++ b/scripts/nas/nasd
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [[ -x "/usr/bin/nasd" ]]; then
+ PROGRAM="/usr/bin/nasd"
+elif [[ -x "/usr/X11R6/bin/nasd" ]]; then
+ PROGRAM="/usr/X11R6/bin/nasd"
+fi
+RUNLEVEL=3
+NEEDS="+remote_fs alsa"
+
+. /etc/sysconfig/nasd
+
+[ ! -z ${NAS_PORT_OFFSET} ] && ARGS=":${NAS_PORT_OFFSET}"
+[ "${NAS_LOCAL_ONLY}" == "yes" ] && ARGS="${ARGS} -local"
+ARGS="${ARGS} -b"
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/nas/nasd.conf b/scripts/nas/nasd.conf
new file mode 100644
index 0000000..5f0276a
--- /dev/null
+++ b/scripts/nas/nasd.conf
@@ -0,0 +1,23 @@
+# this file configures the settings for the nasd init script
+
+## Server options:
+
+#NAS_PORT_OFFSET specifies which port to use. The default port is 8000,
+#so setting this to 1 would mean nasd will use port 8001.
+NAS_PORT_OFFSET=1
+
+#NAS_LOCAL_ONLY makes the nasd server only respond to audio streams from
+#the local machine (localhost) and ignore network connections.
+NAS_LOCAL_ONLY=yes
+
+## Client options
+
+#NAS_AUDIOSERVER defines the hostname or ip-address on which the server
+#is listening. localhost by default.
+NAS_AUDIOSERVER=localhost
+
+#NAS_PORT specifies the port on which the server is listening.
+#it's 8000+n where n is the offset specified on the server.
+#the default is 8000
+NAS_PORT=8001
+
diff --git a/scripts/nessus-core/smgl-nessusd
b/scripts/nessus-core/smgl-nessusd
new file mode 100644
index 0000000..6f4c8a8
--- /dev/null
+++ b/scripts/nessus-core/smgl-nessusd
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+NAME="Nessus Security Scanner"
+PROGRAM=/usr/sbin/nessusd
+ARGS="-D"
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/netatalk/netatalk b/scripts/netatalk/netatalk
new file mode 100644
index 0000000..ab7ee6e
--- /dev/null
+++ b/scripts/netatalk/netatalk
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/afpd
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/netkit-bootparamd/bootparamd
b/scripts/netkit-bootparamd/bootparamd
new file mode 100644
index 0000000..4c0e0f6
--- /dev/null
+++ b/scripts/netkit-bootparamd/bootparamd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/rpc.bootparamd
+RUNLEVEL=3
+NEEDS="+network +portmap +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/netkit-inetd/inetd b/scripts/netkit-inetd/inetd
new file mode 100644
index 0000000..034819a
--- /dev/null
+++ b/scripts/netkit-inetd/inetd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/inetd
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/newsd/newsd b/scripts/newsd/newsd
new file mode 100755
index 0000000..eef8a50
--- /dev/null
+++ b/scripts/newsd/newsd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/newsd
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/nfs-utils/nfs b/scripts/nfs-utils/nfs
new file mode 100644
index 0000000..4be5452
--- /dev/null
+++ b/scripts/nfs-utils/nfs
@@ -0,0 +1,92 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs +network +portmap"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/nfs
+
+if [ ! -e /etc/exports ] ; then
+ $FAILURE
+ echo "Please create an /etc/exports file. Exiting without starting nfs..."
+ $NORMAL
+ exit 1
+fi
+
+# may be outsourced
+get_kernel_pids()
+{
+ local rval=1
+ for pid in $(pidof $1)
+ do
+ if [[ -z $(</proc/$pid/cmdline) ]]; then
+ builtin echo $pid
+ rval=0
+ fi
+ done
+ return $rval
+}
+
+start()
+{
+ echo "Starting full NFS services (server & locking)"
+ # why do we reexport before the daemons are up?
+ # doesn't seem to matter much
+ required_executable /usr/sbin/exportfs
+ echo -n "exportfs"
+ /usr/sbin/exportfs -r
+ evaluate_retval
+
+ # nfs-howto says: these daemons in this order
+ # userspace does not bother about lockd since linux 2.2.18
+ for d in mountd nfsd statd rquotad
+ do
+ required_executable /usr/sbin/rpc.$d
+ local opts=
+ if [[ $d == mountd ]]; then opts="$MOUNTDOPTS"
+ if [[ ! -z "$MOUNTD_PORT" ]]; then opts="$opts -p $MOUNTD_PORT"
+ fi
+ elif [[ $d == nfsd ]]; then opts="$NUMSERVERS"
+ elif [[ $d == statd && ! -z $STATD_PORT ]]; then opts="-p $STATD_PORT"
+ fi
+ echo -n $d
+ loadproc /usr/sbin/rpc.$d $opts
+ done
+}
+
+stop()
+{
+ echo "Stopping NFS services"
+ echo -n "unexporting filesystems"
+ /usr/sbin/exportfs -au
+ evaluate_retval
+
+ # all in one loop to simplify code, reversed order
+ # atm. only nfsd is really in-kernel (and lockd self-managed)
+ for d in rquotad statd nfsd mountd
+ do
+ local kpid=$(get_kernel_pids $d)
+ if [[ -z $kpid ]]; then
+ echo -n "killing $d"
+ killproc /usr/sbin/rpc.$d
+ else
+ echo "not killing kernel $d (PID $kpid)"
+ fi
+ echo "Removing kernel nfsd"
+ /usr/sbin/rpc.nfsd 0
+ done
+}
+
+status()
+{
+ for d in mountd nfsd statd rquotad
+ do
+ local kpid=$(get_kernel_pids $d)
+ [[ -n $kpid ]] && echo "kernel $d there with PIDs $kpid" ||
+ statusproc /usr/sbin/rpc.$d
+ done
+ echo -n "kernel lockd "
+ kpid=$(get_kernel_pids lockd)
+ [[ -n $kpid ]] && echo "is active (PID $kpid)" || echo "is not active (but
hopefully ready)"
+}
diff --git a/scripts/nfs-utils/nfs.conf b/scripts/nfs-utils/nfs.conf
new file mode 100644
index 0000000..0078060
--- /dev/null
+++ b/scripts/nfs-utils/nfs.conf
@@ -0,0 +1,18 @@
+MOUNTDOPTS=""
+NUMSERVERS="1"
+#
+# Suggested port for rpc.statd
+#
+#STATD_PORT=4001
+
+#
+# Suggested port for rpc.mountd
+#
+#MOUNTD_PORT=4003
+
+# To set LOCKD port, set the following in /etc/modules.conf:
+# options lockd nlm_udpport=4002 nlm_tcpport=4002
+# or pass the following to your kernel at boot:
+# lockd.nlm_udpport=4002 lockd.nlm_tcpport=4002
+#LOCKD_TCPPORT=4002
+#LOCKD_UDPPORT=4002
diff --git a/scripts/nfs-utils/nfslock b/scripts/nfs-utils/nfslock
new file mode 100644
index 0000000..2f46cd1
--- /dev/null
+++ b/scripts/nfs-utils/nfslock
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs +network +portmap"
+
+. /etc/init.d/smgl_init
+
+# may be outsourced
+get_kernel_pids()
+{
+ local rval=1
+ for pid in $(pidof $1)
+ do
+ if [[ -z $(</proc/$pid/cmdline) ]]; then
+ builtin echo $pid
+ rval=0
+ fi
+ done
+ return $rval
+}
+
+start()
+{
+ required_executable /usr/sbin/rpc.statd
+
+ echo "Starting NFS file locking services (for client)"
+ loadproc /usr/sbin/rpc.statd
+ # rpc.lockd is automatic for linux >= 2.2.18
+}
+
+stop()
+{
+ echo "Stopping NFS file locking services"
+ killproc /usr/sbin/rpc.statd
+}
+
+status()
+{
+ statusproc /usr/sbin/rpc.statd
+ # kernel lockd shows itself only when actually at work
+ echo -n "kernel lockd "
+ kpid=$(get_kernel_pids lockd)
+ [[ -n $kpid ]] && echo "is active (PID $kpid)" || echo "is not active (but
hopefully ready)"
+}
diff --git a/scripts/noip/smgl-noip b/scripts/noip/smgl-noip
new file mode 100644
index 0000000..5b79f41
--- /dev/null
+++ b/scripts/noip/smgl-noip
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/noip2
+ARGS="-c /etc/no-ip2.conf"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_functions
+
+if [[ ! -e /etc/no-ip2.conf ]]; then
+ echo "No configuration file found (/etc/no-ip2.conf)"
+ echo "To create it, run: noip2 -C -c /etc/no-ip2.conf"
+ print_status failure
+ exit 1
+fi
+
+. /etc/init.d/smgl_init
diff --git a/scripts/nrpe/nrpe b/scripts/nrpe/nrpe
new file mode 100644
index 0000000..15e74e8
--- /dev/null
+++ b/scripts/nrpe/nrpe
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/nrpe
+ARGS="-c /etc/nrpe.cfg -d"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/nsd/nsd b/scripts/nsd/nsd
new file mode 100755
index 0000000..6795229
--- /dev/null
+++ b/scripts/nsd/nsd
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/nsd
+PIDFILE=/var/run/nsd.pid
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/ntop/ntop b/scripts/ntop/ntop
new file mode 100644
index 0000000..4879f0a
--- /dev/null
+++ b/scripts/ntop/ntop
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/sysconfig/ntop
+
+if [ -d /etc/sysconfig/network ] ; then
+ for i in /etc/sysconfig/network/*.dev ; do
+ i=$( basename ${i%.dev} )
+ [ "$i" = "lo" -a "$IGNORE_LO" = "yes" ] && continue
+ IFACES="${IFACES},$i"
+ done
+ IFACES="${IFACES#,}" # Remove comma from beginning of list
+fi
+
+PROGRAM=/usr/bin/ntop
+NAME="ntop (using following interfaces: ${IFACES}"
+ARGS="-d -u ntop -w $HTTP_PORT -W $HTTPS_PORT \
+ --use-syslog=daemon -i ${IFACES} -M"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting ntop (tracking interfaces: ${IFACES}..."
+ loadproc $PROGRAM $ARGS
+}
diff --git a/scripts/ntop/ntop.conf b/scripts/ntop/ntop.conf
new file mode 100644
index 0000000..cf994df
--- /dev/null
+++ b/scripts/ntop/ntop.conf
@@ -0,0 +1,10 @@
+# Set to yes if you wish ntop to ignore the local network device (default:
no)
+IGNORE_LO=no
+
+# Which http port should ntop listen to? When set to 0 then the http server
is
+# disabled (default: 0)
+HTTP_PORT=0
+
+# Which https port (SSL encrytion enabled) should ntop listen to? When set
to 0
+# then the https server is disabled (default: 3000)
+HTTPS_PORT=3000
diff --git a/scripts/ntp/ntp b/scripts/ntp/ntp
new file mode 100644
index 0000000..c3d5fcf
--- /dev/null
+++ b/scripts/ntp/ntp
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PIDFILE=/var/run/ntpd.pid
+PROGRAM=/usr/bin/ntpd
+ARGS="-p $PIDFILE -u ntp:ntp -i /var/chroot/ntp"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/nufw/smgl-nufw b/scripts/nufw/smgl-nufw
new file mode 100755
index 0000000..f334642
--- /dev/null
+++ b/scripts/nufw/smgl-nufw
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/nufw
+PROGRAM_ARGS="-D"
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+required_executable /usr/sbin/nuauth
+
+start()
+{
+ echo "Starting nufw..."
+ $PROGRAM $PROGRAM_ARGS
+ evaluate_retval
+ echo "Starting nuauth..."
+ if [[ ! -d /var/run/nuauth ]] ; then
+ mkdir -p /var/run/nuauth
+ fi
+ /usr/sbin/nuauth $PROGRAM_ARGS
+ evaluate_retval
+}
+
+stop()
+{
+ NUFW_PID=$(cat /var/run/nufw.pid)
+ NUAUTH_PID=$(cat /var/run/nuauth/nuauth.pid)
+ echo "Stopping nuauth..."
+ kill $NUAUTH_PID
+ evaluate_retval
+ echo "Stopping nufw..."
+ kill $NUFW_PID
+ evaluate_retval
+}
+
+status()
+{
+ echo "Writing an audit line to syslog"
+ kill -s POLL $(pidof nufw)
+}
diff --git a/scripts/nut/upsd b/scripts/nut/upsd
new file mode 100755
index 0000000..7b457f9
--- /dev/null
+++ b/scripts/nut/upsd
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/upsd
+RUNLEVEL=3
+NEEDS="+remote_fs upsdrvctl"
+
+. /etc/init.d/smgl_init
+
+start() {
+ $PROGRAM -u ups
+}
+
+stop() {
+ $PROGRAM -c stop
+}
+
+reload() {
+ $PROGRAM -c reload
+}
diff --git a/scripts/nut/upsdrvctl b/scripts/nut/upsdrvctl
new file mode 100755
index 0000000..0d6e043
--- /dev/null
+++ b/scripts/nut/upsdrvctl
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/upsdrvctl
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ $PROGRAM -u ups start
+}
+
+stop() {
+ $PROGRAM stop
+}
+
+reload() {
+ stop
+ start
+}
+
diff --git a/scripts/nut/upsmon b/scripts/nut/upsmon
new file mode 100755
index 0000000..b54c85f
--- /dev/null
+++ b/scripts/nut/upsmon
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/upsmon
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ $PROGRAM -u ups
+}
+
+stop() {
+ $PROGRAM -c stop
+}
+
+reload() {
+ $PROGRAM -c reload
+}
diff --git a/scripts/oidentd/oidentd b/scripts/oidentd/oidentd
new file mode 100644
index 0000000..d4a252e
--- /dev/null
+++ b/scripts/oidentd/oidentd
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/oidentd
+ARGS="-u daemon -g daemon"
+RUNLEVEL=3
+PROVIDES=identd
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/omniorb/omniorb-nameserver
b/scripts/omniorb/omniorb-nameserver
new file mode 100755
index 0000000..6971260
--- /dev/null
+++ b/scripts/omniorb/omniorb-nameserver
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+. /etc/sysconfig/omniorb-nameserver
+if [[ "$OMNISERVER" == "NAMES" ]] ; then
+ PROGRAM=/usr/bin/omniNames
+ ARGS="-start $OMNINAMES_PORT -logdir $OMNINAMES_LOGDIR -errlog
$OMNINAMES_ERRLOG $OMNINAMES_ORBARGS"
+ DESC="omniORB Name Server daemon"
+elif [[ "$OMNISERVER" == "MAPPER" ]] ; then
+ PROGRAM=/usr/bin/omniMapper
+ ARGS="-port $OMNIMAPPER_PORT -config $OMNIMAPPER_CONFIG $OMNIMAPPER_ARGS"
+ DESC="omniORB Mapper Server daemon"
+else
+ return 1
+fi
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
+required_executable $PROGRAM
+
+start()
+{
+ # do some checking for logdir and stuff so the service will start
+ if [[ "$OMNISERVER" == "NAMES" ]] ; then
+ if [[ ! -d "$OMNINAMES_LOGDIR" ]] ; then
+ mkdir -p "$OMNINAMES_LOGDIR"
+ fi &&
+ if [[ ! -d "$(dirname $OMNINAMES_ERRLOG)" ]] ; then
+ mkdir -p "$(dirname $OMNINAMES_ERRLOG)"
+ fi &&
+ if [[ -f $OMNINAMES_LOGDIR/omninames-$(hostname).log ]] ; then
+ mv $OMNINAMES_LOGDIR/omninames-$(hostname).log
$OMNINAMES_LOGDIR/omninames-$(hostname).log-$(date +%Y%m%d%H%M%S)
+ fi &&
+ if [[ -f $OMNINAMES_LOGDIR/omninames-$(hostname).bak ]] ; then
+ mv $OMNINAMES_LOGDIR/omninames-$(hostname).bak
$OMNINAMES_LOGDIR/omninames-$(hostname).bak-$(date +%Y%m%d%H%M%S)
+ fi
+ fi
+ echo "Starting: $DESC" &&
+ ( $PROGRAM $ARGS & ) &&
+ sleep 1 &&
+ pidof $(basename $PROGRAM) > /var/run/$(basename $PROGRAM).pid
+}
+
+stop()
+{
+ if [[ -f /var/run/$(basename $PROGRAM).pid ]] ; then
+ echo "Stopping: $DESC with pid $(cat /var/run/`basename $PROGRAM`.pid)"
&&
+ kill $(cat /var/run/`basename $PROGRAM`.pid) >> /dev/null 2>&1
+ else
+ echo "$DESC not running..."
+ fi
+}
diff --git a/scripts/omniorb/omniorb-nameserver.conf
b/scripts/omniorb/omniorb-nameserver.conf
new file mode 100755
index 0000000..eee0bd4
--- /dev/null
+++ b/scripts/omniorb/omniorb-nameserver.conf
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+OMNISERVER="NAMES" # value should be 'NAMES' or 'MAPPER'
+
+OMNINAMES_PORT="2809"
+
+OMNINAMES_LOGDIR="/var/log/omninames"
+
+OMNINAMES_ERRLOG="/var/log/omninames/error.log"
+
+OMNINAMES_ORBARGS=""
+
+OMNIMAPPER_PORT="2809"
+
+OMNIMAPPER_CONFIG="/etc/omniMapper.cfg"
+
+#OMNIMAPPER_ARGS="-v"
diff --git a/scripts/openldap/slapd b/scripts/openldap/slapd
new file mode 100755
index 0000000..fd185ea
--- /dev/null
+++ b/scripts/openldap/slapd
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# SMGL-script-version=20030224
+# SMGL-START:1 2 3 4 5:S35
+# SMGL-STOP:0 6:K50
+
+. /etc/sysconfig/slapd
+
+PROGRAM=/usr/libexec/slapd
+
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting slapd...."
+ # this works, starts both of them nicely
+ $PROGRAM -h "$SLAPD_URL"
+ evaluate_retval
+}
diff --git a/scripts/openldap/slapd.conf b/scripts/openldap/slapd.conf
new file mode 100644
index 0000000..dfbb980
--- /dev/null
+++ b/scripts/openldap/slapd.conf
@@ -0,0 +1,3 @@
+# remove ldaps part if you don't want to slapd to listen
+# on ldaps port, i.e. if ssl/tls support is not compiled in
+SLAPD_URL='ldap:/// ldaps:///'
diff --git a/scripts/openmosix-tools/openmosix
b/scripts/openmosix-tools/openmosix
new file mode 100755
index 0000000..63b1325
--- /dev/null
+++ b/scripts/openmosix-tools/openmosix
@@ -0,0 +1,194 @@
+#!/bin/sh
+
+PROGRAM=/bin/true
+RUNLEVEL=3
+NEEDS="+remote_fs +network +portmap"
+
+. /etc/init.d/smgl_init
+
+if ! [ -d /var/lock/subsys ]
+then mkdir -p /var/lock/subsys/
+fi
+
+# Init file for openMosix
+#
+# config: /etc/openmosix.map
+# config: /etc/openmosix/openmosix.config
+# Define some variables pointing to openMosix's necessary executables
+# which should be found in the userland-tools
+SETPE="/usr/sbin/setpe"
+OMDISCD="/usr/sbin/omdiscd"
+MOSCTL="/usr/bin/mosctl"
+
+# Variables used for info, warning and error messages
+OM_MSG="openMosix:"
+OM_MSG_WARN="$OM_MSG WARN:"
+OM_MSG_ERR="$OM_MSG ERROR:"
+OM_MSG_HINT="$OM_MSG HINT:"
+
+# Some standard hints: useful for pointing people to the right place
+# before bugging anyone on the mailing lists ;-)
+HINT_WEBSITE="$OM_MSG_HINT have you read the docs at
http://openMosix.sf.net/ ?"
+HINT_RECOMPILE_KERNEL="$OM_MSG_HINT need to recompile your kernel with
openMosix support enabled?"
+HINT_BOOT_MANAGER="$OM_MSG_HINT need to update your boot manager (lilo,
grub, etc)?"
+HINT_USERLAND_TOOLS="$OM_MSG_HINT have you installed the userland-tools?"
+HINT_DEPRECATED_MAP="$OM_MSG_HINT # mv /etc/deprecated.map
/etc/openmosix.map"
+
+# If we're not running an openMosix enabled kernel: exit
+if [ ! -d /proc/hpc ]; then
+ echo "$OM_MSG_ERR Cannot find the /proc/hpc directory."
+ echo "$OM_MSG_ERR Looks like this is not an openMosix enabled kernel."
+ echo "$OM_MSG_ERR Configuration ABORTED."
+ echo "$HINT_RECOMPILE_KERNEL"
+ echo "$HINT_BOOT_MANAGER"
+ echo "$HINT_WEBSITE"
+ exit 1
+fi
+
+# Find the openMosix map-file if any exists,
+# otherwise fall back to using the autodiscovery daemon
+AUTODISC=0
+if [ -f /etc/openmosix.map ]; then
+ OMOSIX_MAP=/etc/openmosix.map
+ echo "Using map file /etc/openmosix.map"
+elif [ -f /etc/mosix.map ]; then
+ OMOSIX_MAP=/etc/mosix.map
+ echo " Using map file /etc/mosix.map"
+ echo "$OM_MSG_WARN map-file /etc/mosix.map is DEPRECATED"
+ echo "$HINT_DEPRECATED_MAP"
+elif [ -f /etc/hpc.map ]; then
+ OMOSIX_MAP=/etc/hpc.map
+ echo " Using map-file /etc/hpc.map"
+ echo "$OM_MSG_WARN map-file /etc/hpc.map is DEPRECATED"
+ echo "$HINT_DEPRECATED_MAP"
+else
+ AUTODISC=1
+ echo "No map-file found."
+ echo "Falling back to autodiscovery mode using $OMDISCD"
+fi
+
+# Check the map-file for sanity
+if [ $AUTODISC -eq 0 ]; then
+ $SETPE -c -f $OMOSIX_MAP &> /dev/null
+ if [ ! $? -eq 0 ]; then
+ echo "$OM_MSG_WARN Invalid configuration in map-file $OMOSIX_MAP"
+ echo "Falling back to autodiscovery mode using $OMDISCD"
+ AUTODISC=1
+ fi
+fi
+
+# Source the configuration from /etc/openmosix/openmosix.config
+# This file would be a good place to force autodiscovery by setting
AUTODISC=1
+[ -f /etc/openmosix/openmosix.config ] && . /etc/openmosix/openmosix.config
+
+# Make sure we have omdiscd installed
+if [ $AUTODISC -eq 1 ]; then
+ if [ ! -x $OMDISCD ]; then
+ echo "$OM_MSG_ERR cannot find executable file $OMDISCD"
+ echo "$OM_MSG_ERR $OMDISCD is not installed."
+ echo "$OM_MSG_ERR ABORTING"
+ echo "$HINT_USERLAND_TOOLS"
+ echo "$HINT_WEBSITE"
+ exit 1
+ fi
+fi
+
+
+stop() {
+ echo "Stopping openMosix..."
+ # Expel all processes
+ $MOSCTL expel
+ evaluate_retval
+ # disable openMosix configuration
+ $SETPE -off
+ evaluate_retval
+ # kill any autodiscovery deamon if running
+ killall -TERM omdiscd &> /dev/null
+ evaluate_retval
+ # remove lock file
+ rm -f /var/lock/subsys/openmosix
+ evaluate_retval
+}
+
+start() {
+ echo "Initializing openMosix..."
+ # The variables $OVERHEADS, $MFSCOSTS, $MYOMID, $MOSGATES,
+ # $AUTODISCIF and $NODESPEED can be set to desired values
+ # in /etc/openmosix/openmosix.config
+ [ $OVERHEADS ] && echo $OVERHEADS > /proc/hpc/admin/overheads
+ [ $MFSCOSTS ] && echo $MFSCOSTS > /proc/hpc/admin/mfscosts
+
+ if [ $AUTODISC -eq 0 ]; then
+ # Make sure we have setpe installed
+ if [ ! -x $SETPE ]; then
+ echo "$OM_MSG_ERR cannot find executable file $SETPE"
+ echo "$OM_MSG_ERR $SETPE is not installed."
+ echo "$OM_MSG_ERR ABORTING"
+ echo "$HINT_USERLAND_TOOLS"
+ echo "$HINT_WEBSITE"
+ exit 1
+ fi
+
+ # Static configuration via $OMOSIX_MAP
+ SETPE_OPTIONS=""
+ [ $MYOMID ] && SETPE_OPTIONS="$SETPE_OPTIONS -p $MYOMID"
+ [ $MOSGATES ] && SETPE_OPTIONS="$SETPE_OPTIONS -g $MOSGATES"
+
+ $SETPE -W $SETPE_OPTIONS -f $OMOSIX_MAP
+ evaluate_retval
+ else
+ # Configure openMosix with the omdiscd
+ OMDISCD_OPTIONS=""
+ [ $AUTODISCIF ] && OMDISCD_OPTIONS="$OMDISCD_OPTIONS -i $AUTODISCIF"
+
+ # we have already checked that omdiscd exists and is executable
+ # so we just need to invoke it
+ $OMDISCD $OMDISCD_OPTIONS
+ evaluate_retval
+ fi
+
+ if [ $MIGRATE ]; then
+ if [ $MIGRATE == "yes" ]; then
+ $MOSCTL -lstay
+ evaluate_retval
+ $MOSCTL -stay
+ evaluate_retval
+ else
+ $MOSCTL lstay
+ evaluate_retval
+ fi
+ fi
+
+ if [ $BLOCK ]; then
+ if [ $BLOCK == "yes" ]; then
+ $MOSCTL block
+ evaluate_retval
+ else
+ $MOSCTL -block
+ evaluate_retval
+ fi
+ fi
+
+ if [ $MFS ]; then
+ if [ $MFS == "yes" ]; then
+ $MOSCTL mfs
+ evaluate_retval
+ else
+ $MOSCTL nomfs
+ evaluate_retval
+ fi
+ fi
+
+ if [ $? -eq 0 ]; then
+ # if everything went ok, put a lock file into /var/lock/subsys
+ touch /var/lock/subsys/openmosix
+ # allow process migration now
+ [ ! $BLOCK ] && $MOSCTL noblock 1>/dev/null 2>&1
+ # set speed of node if specified in the .config file
+ [ $NODESPEED ] && $MOSCTL setspeed $NODESPEED 1>/dev/null 2>&1
+ echo "openMosix configuration was successful :)"
+ else
+ # print error message
+ echo "openMosix configuration failed :("
+ fi
+}
diff --git a/scripts/openmosixview/mosstatd.sh
b/scripts/openmosixview/mosstatd.sh
new file mode 100644
index 0000000..1957f44
--- /dev/null
+++ b/scripts/openmosixview/mosstatd.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# mosstatd This shell script takes care of starting and stopping \
+# the mosstatd daemon.
+
+
+PROGRAM=/usr/bin/mosstatd
+RUNLEVEL=3
+NEEDS="+remote_fs +network +portmap openmosix"
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/openmosixview/openmosixcollector
b/scripts/openmosixview/openmosixcollector
new file mode 100644
index 0000000..f8f4558
--- /dev/null
+++ b/scripts/openmosixview/openmosixcollector
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PROGRAM=/usr/bin/openmosixcollector
+ARGS=""
+RUNLEVEL=3
+NEEDS="+remote_fs +network +portmap mosstatd.sh"
+
+. /etc/init.d/smgl_init
+
+start() {
+/usr/bin/openmosixcollector -d
+evaluate_retval
+}
+
+stop() {
+/usr/bin/openmosixcollector -k
+evaluate_retval
+}
+
+status() {
+/usr/bin/openmosixcollector -c
+evaluate_retval
+}
+
+
diff --git a/scripts/openntpd/ntp b/scripts/openntpd/ntp
new file mode 100644
index 0000000..4a3c3a1
--- /dev/null
+++ b/scripts/openntpd/ntp
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+#PIDFILE=/var/run/ntp/ntpd.pid
+PROGRAM=/usr/sbin/ntpd
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
+function start()
+{
+ mkdir -p /var/run/ntp
+ chmod 0700 /var/run/ntp
+ echo "Starting $NAME..."
+ loadproc $PROGRAM $ARGS
+}
+
diff --git a/scripts/openssh/sshd b/scripts/openssh/sshd
new file mode 100755
index 0000000..c90f1e8
--- /dev/null
+++ b/scripts/openssh/sshd
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/sshd
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo -n "Starting sshd..."
+ $PROGRAM
+ ITER=0
+ while [ ! -e /var/run/sshd.pid ] && [ "$ITER" -lt 10 ] ; do sleep 1; echo
-n . ;ITER=$((++ITER)); done
+ echo
+ if [ -e /var/run/sshd.pid ]; then
+ ps -p `cat /var/run/sshd.pid` > /dev/null && evaluate_retval
+ else
+ print_status failure
+ exit 1
+ fi
+}
+
+reload() {
+ # reloadproc causes loss of connection when remotely connected
+ echo "Reloading sshd..."
+ if [ -e /var/run/sshd.pid ]; then
+ kill `cat /var/run/sshd.pid`
+ sleep 1
+ fi
+ $0 start
+}
+
+restart() {
+run_func reload
+}
diff --git a/scripts/openswan/ipsec b/scripts/openswan/ipsec
new file mode 100644
index 0000000..5ce1117
--- /dev/null
+++ b/scripts/openswan/ipsec
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/ipsec
+ARGS="setup"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+status()
+{
+ $PROGRAM $ARGS status
+}
+start()
+{
+ $PROGRAM $ARGS start
+}
+stop()
+{
+ $PROGRAM $ARGS stop
+}
diff --git a/scripts/openvpn/openvpn b/scripts/openvpn/openvpn
new file mode 100755
index 0000000..f9db86e
--- /dev/null
+++ b/scripts/openvpn/openvpn
@@ -0,0 +1,160 @@
+#!/bin/bash
+
+# Converted to SMGL simpleinit from the OpenVPN SysV init script.
+
+# Originally Contributed to the OpenVPN project by
+# Douglas Keller <doug AT voidstar.dyndns.org>
+# 2002.05.15
+
+# The init script does the following:
+# - Runs /etc/openvpn/openvpn-{startup,stop} on start/stop.
+#
+# - Starts an openvpn process for each .conf file it finds in
+# /etc/openvpn.
+#
+# - If /etc/openvpn/xxx.sh exists for a xxx.conf file then it executes
+# it before starting openvpn (useful for doing openvpn --mktun...).
+#
+# - Define an extra command reopen().
+#
+# Changes for SMGL:
+# - Adapted for simpleinit/smgl init functions.
+# - Renamed some variables for consistency.
+# - Removed $lock; if start() is called while openvpn is running, just issue
a
+# warning and exit (consistent the default behaviour under SMGL).
+# - Give per-config file status output.
+# - Use the default status() function instead of dumping to syslog.
+
+NAME=OpenVPN
+PROGRAM=/usr/sbin/openvpn
+CONFDIR=/etc/openvpn
+PIDDIR=/var/run/openvpn
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+# Remove stale pid files.
+cleanpids()
+{
+ for f in `find $PIDDIR -name "*.pid" 2>/dev/null`; do
+ p="`cat $f`"
+ if [ "x`ps -p $p -o comm= 2>/dev/null`" != "xopenvpn" ]; then
+ rm -f "$f"
+ fi
+ done
+}
+
+# Track pids by known tunnels instead of all running procs.
+getpids()
+{
+ # status() should perhaps handle this differently, but for now always
clean.
+ cleanpids
+
+ pidflist="`find $PIDDIR -name "*.pid" 2>/dev/null`"
+ pidlist="$(for f in $pidflist; do if [ -s $f ]; then cat $f; fi; done)"
+}
+
+start()
+{
+ getpids
+ if [ -n "$pidlist" ]; then
+ $SET_WCOL
+ print_status warning running
+ exit
+ fi
+
+ echo "Starting $NAME..."
+
+ # Try to make sure the TUN/TAP module is loaded.
+ /sbin/modprobe tun >/dev/null 2>&1
+
+ if [ -x $CONFDIR/openvpn-startup ]; then
+ $CONFDIR/openvpn-startup
+ fi
+ evaluate_retval || exit 1 # Don't bring up tunnels if the startup failed.
+
+ if [ ! -d $PIDDIR ]; then
+ mkdir -p $PIDDIR
+ fi
+
+ CS="`find $CONFDIR -name "*.conf" 2>/dev/null`"
+ if [ -z "$CS" ]; then
+ echo "Note: No OpenVPN configuration files were found in $CONFDIR"
+ else
+ for C in $CS; do
+ BN=${C%%.conf}
+ echo "Starting $NAME tunnel '${BN##*/}'..."
+ if [ -x "$BN.sh" ]; then
+ . $BN.sh
+ fi && $PROGRAM --daemon --writepid $PIDDIR/${BN##*/}.pid --config $C
--cd $CONFDIR
+ evaluate_retval
+ done
+ fi
+}
+
+# Most of stop() is copied from smgl_functions to get things in the right
+# order.
+stop()
+{
+ getpids
+
+ for PIDF in $pidflist; do
+ if [ -s $PIDF ]; then
+ BN=${PIDF%%.pid}
+ echo "Stopping $NAME tunnel '${BN##*/}'..."
+ pid=`cat $PIDF`
+ kill -TERM $pid 2>/dev/null
+ for ((i=0; $i<5000; i=$i+1)) ; do : ; done
+
+ for ((i=0; $i<$KILLDELAY; i=$i+1)) ; do
+ kill -0 $pid 2>/dev/null || break
+ sleep 1
+ done
+
+ kill -KILL $pid 2>/dev/null
+
+ for ((i=0; $i<$KILLDELAY; i=$i+1)) ; do
+ kill -0 $pid 2>/dev/null || break
+ sleep 1
+ done
+
+ kill -0 $pid 2>/dev/null && failure=1
+ (exit $failure)
+ evaluate_retval
+ fi
+ rm -f $PIDF
+ done
+
+ echo "Stopping $NAME..."
+ if [ -x $CONFDIR/openvpn-shutdown ]; then
+ $CONFDIR/openvpn-shutdown
+ fi
+ evaluate_retval
+}
+
+reopen()
+{
+ echo "Reopening $NAME tunnels..."
+ reloadproc $PROGRAM USR1
+}
+
+status()
+{
+ # This is not wrong, we track by tunnel, not by any matching process.
+ statusproc $NAME
+}
+
+# This script has an extra option.
+usage()
+{
+ echo "Usage: $0 {start|stop|restart|reload|reopen|force-reload|status}"
+}
+
+case $1 in
+ reopen)
+ $1
+ unset PROGRAM # So that exiting won't trigger auto_init.
+ exit $?
+ ;;
+esac
diff --git a/scripts/palantir/palantir b/scripts/palantir/palantir
new file mode 100755
index 0000000..75710f7
--- /dev/null
+++ b/scripts/palantir/palantir
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Init file for Palantir and related services
+#
+# processname: palantir
+# processname: sysfeed
+
+. /etc/init.d/smgl_init
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network"
+
+PLOGFILE=/var/log/palantir
+USER=palantir
+
+case "$1" in
+ start)
+ if [ ! -e /dev/video0 ]; then
+ echo "No video devices found"
+ exit 1
+ fi
+ echo "Starting Palantir services..."
+ if [ ! -f /var/log/palantir ] ; then
+ touch $PLOGFILE
+ chown $USER $PLOGFILE
+ fi
+ su $USER -c "palantir &"
+ su $USER -c "sysfeed >& /dev/null &"
+ evaluate_retval
+ ;;
+
+ stop)
+ echo -n "Stopping Palantir:"
+ killproc palantir
+ echo
+ echo -n "Stopping sysfeed:"
+ killproc sysfeed
+ echo
+ evaluate_retval
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ evaluate_retval
+ ;;
+
+ *)
+ echo "Usage: palantir {start|stop|restart}"
+ ;;
+esac
+
diff --git a/scripts/pbbuttonsd/pbbuttonsd b/scripts/pbbuttonsd/pbbuttonsd
new file mode 100755
index 0000000..075a8a4
--- /dev/null
+++ b/scripts/pbbuttonsd/pbbuttonsd
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/pbbuttonsd
+RUNLEVEL=3
+PIDFILE=/var/run/pbbuttonsd.pid
+ARGS="-d $PIDFILE"
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/pcmcia-cs/pcmcia b/scripts/pcmcia-cs/pcmcia
new file mode 100755
index 0000000..5801f5a
--- /dev/null
+++ b/scripts/pcmcia-cs/pcmcia
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+. /etc/sysconfig/pcmcia
+
+PROGRAM=/sbin/cardmgr
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ [ "$PCMCIA" = "yes" ] || exit 0
+ if [ "$PCIC" = "" ]; then
+ echo "PCIC module not defined in /etc/sysconfig/pcmcia!"
+ /bin/false
+ evaluate_retval
+ exit 6
+ fi
+
+ if ! grep -q pcmcia /proc/devices ; then
+ echo -n "Loading pcmcia modules:"
+ echo -n "pcmcia_core . "
+ /sbin/modprobe pcmcia_core $CORE_OPTS > /dev/null 2>&1 &&
+ (
+ echo -n "$PCIC . "
+ if ! /sbin/modprobe $PCIC $PCIC_OPTS >/dev/null 2>&1; then
+ /sbin/modprobe yenta_socket >/dev/null 2>&1 &&
+ echo -n "using yenta_socket instead of $PCIC . "
+ fi &&
+ echo -n "ds ."
+ /sbin/modprobe ds > /dev/null 2>&1
+ )
+ RET_CODE=$?
+ echo
+ [ $RET_CODE -ne 0 ] && /bin/false
+ fi
+ evaluate_retval
+
+ if grep -q pcmcia /proc/devices; then
+ echo "Loading cardmgr..."
+ loadproc $PROGRAM $CARDMGR_OPTS
+ fi
+}
+
+stop()
+{
+ echo "Stopping cardmgr"
+ killproc $PROGRAM
+ if grep -q "ds " /proc/modules; then
+ echo "Unloading modules: "
+ /sbin/rmmod ds 2> /dev/null &&
+ (
+ echo "ds "
+ if /sbin/rmmod $PCIC 2> /dev/null; then
+ echo "$PCIC "
+ else
+ /sbin/rmmod yenta_socket 2> /dev/null && echo "yenta_socket "
+ fi
+ ) &&
+ /sbin/rmmod pcmcia_core 2> /dev/null && echo "pcmcia_core"
+ fi
+ evaluate_retval
+}
+
+reload()
+{
+ run_func restart
+}
diff --git a/scripts/pcmcia-cs/pcmcia.conf b/scripts/pcmcia-cs/pcmcia.conf
new file mode 100644
index 0000000..37483da
--- /dev/null
+++ b/scripts/pcmcia-cs/pcmcia.conf
@@ -0,0 +1,15 @@
+# start pcmcia service
+PCMCIA=yes
+
+# pcmcia driver module
+# default is yenta-socket, another common one is i82365
+PCIC=yenta-socket
+
+# driver module options
+PCIC_OPTS=
+
+# options for pcmcia_core module
+CORE_OPTS=
+
+# options for cardmgr
+CARDMGR_OPTS=
diff --git a/scripts/pglogd/pglogd.sh b/scripts/pglogd/pglogd.sh
new file mode 100644
index 0000000..33e7b80
--- /dev/null
+++ b/scripts/pglogd/pglogd.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Source Mage init.d install information
+# SMGL-script-version=20030331
+# SMGL-START:3 4 5:S33
+# SMGL-STOP:0 1 2 6:K11
+#
+
+case $1 in
+ start|restart ) echo "$1ing pglogd - Apache web server logger."
+ mkdir -p /var/log/pglogd
+ pkill "^pglogd$"
+ pglogd -c /etc/pglogd.conf
+ ;;
+
+ stop ) echo "$1ing pglogd - Apache web server logger."
+ pkill "^pglogd$"
+ ;;
+
+ *) echo "Usage: $0 {start|stop|restart}"
+ ;;
+esac
diff --git a/scripts/pikt/piktsvc b/scripts/pikt/piktsvc
new file mode 100755
index 0000000..fe95df6
--- /dev/null
+++ b/scripts/pikt/piktsvc
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+RUNLEVEL=3
+PROGRAM=/usr/bin/piktc_svc
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/pks/pks b/scripts/pks/pks
new file mode 100755
index 0000000..03865aa
--- /dev/null
+++ b/scripts/pks/pks
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/pksd
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting PGP Public Key Server..."
+ pksclient /var/db recover 2> /dev/null > /dev/null
+ $PROGRAM /etc/pksd.conf & (sleep 5; /usr/bin/pks-queue-run.sh
/etc/pksd.conf) &
+ [ -n "`ps ax | grep usr/sbin/[p]ksd | cut -c 1-5`" ] && evaluate_retval
+}
+stop() {
+ echo "Stopping PGP Public Key Server..."
+ kill -KILL `ps ax | grep usr/sbin/[p]ksd | cut -c 1-5`
+ evaluate_retval
+}
diff --git a/scripts/plptools/plpfuse b/scripts/plptools/plpfuse
new file mode 100755
index 0000000..fa38e6e
--- /dev/null
+++ b/scripts/plptools/plpfuse
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+. /etc/sysconfig/psion
+
+NAME="Psion FUSE mount"
+PROGRAM=/usr/sbin/plpfuse
+ARGS="$PLPFUSE_PORT $PLPFUSE_MOUNTPOINT $PLPFUSE_FUSEOPT"
+RUNLEVEL=3
+NEEDS="psion"
+
+. /etc/init.d/smgl_init
+
+# fix to unmout fuse mounted directory
+stop ()
+{
+ echo "Stopping $NAME..."
+ killproc $PROGRAM
+ umount $PLPFUSE_MOUNTPOINT
+}
diff --git a/scripts/plptools/plpprintd b/scripts/plptools/plpprintd
new file mode 100755
index 0000000..6da0fa5
--- /dev/null
+++ b/scripts/plptools/plpprintd
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+. /etc/sysconfig/psion
+
+NAME="Psion print server"
+PROGRAM=/usr/sbin/plpprintd
+ARGS="$PLPPRINTD_ARGS"
+RUNLEVEL=3
+NEEDS="psion"
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/plptools/psion b/scripts/plptools/psion
new file mode 100755
index 0000000..6a9dac7
--- /dev/null
+++ b/scripts/plptools/psion
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+. /etc/sysconfig/psion
+
+NAME="Psion serial connection daemon"
+PROGRAM=/usr/sbin/ncpd
+ARGS="$NCPD_ARGS"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/plptools/psion.conf b/scripts/plptools/psion.conf
new file mode 100644
index 0000000..105492a
--- /dev/null
+++ b/scripts/plptools/psion.conf
@@ -0,0 +1,5 @@
+NCPD_ARGS="--baudrate=115200"
+PLPPRINTD_ARGS=""
+PLPFUSE_PORT=""
+PLPFUSE_MOUNTPOINT="/mnt/psion"
+PLPFUSE_FUSEOPT=""
diff --git a/scripts/popfile/popfile b/scripts/popfile/popfile
new file mode 100755
index 0000000..34bfd56
--- /dev/null
+++ b/scripts/popfile/popfile
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# Startup/shutdown script for popfile
+#
+#
+# Start or stop popfile based upon the first argument to the script.
+#
+
+source /etc/init.d/smgl_functions
+
+#PROGRAM=/usr/sbin/privoxy
+#ARGS="/etc/privoxy/config"
+RUNLEVEL=3
+NEEDS="+network"
+
+#. /etc/init.d/smgl_init
+
+
+case $1 in
+ start)
+ echo "Starting popfile"
+ cd /usr/share/popfile/
+ loadproc ./popfile.pl &
+ evaluate_retval
+ cp /usr/share/popfile/popfile.pid /var/run 1>/dev/null 2>&1
+ echo " "
+ ;;
+
+ stop)
+ echo "Stopping popfile"
+ killproc /usr/share/popfile/popfile.pl
+ evaluate_retval
+ echo " "
+ rm -f /usr/share/popfile/popfile.pid
+ ;;
+
+ restart|reload)
+ echo "Restarting popfile"
+ $0 stop
+ $0 start
+ evaluate_retval
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+# end of procfile startup script
diff --git a/scripts/poptop/pptpd b/scripts/poptop/pptpd
new file mode 100755
index 0000000..0632b23
--- /dev/null
+++ b/scripts/poptop/pptpd
@@ -0,0 +1,13 @@
+#! /bin/bash
+#
+#
+# Startup/shutdown script for PoPToP
+#
+#
+# Start or stop pptpd based upon the first argument to the script.
+#
+
+RUNLEVEL=3
+NEEDS="+network"
+PROGRAM=/usr/sbin/pptpd
+. /etc/init.d/smgl_init
diff --git a/scripts/portmap/portmap b/scripts/portmap/portmap
new file mode 100644
index 0000000..46d5f0e
--- /dev/null
+++ b/scripts/portmap/portmap
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/sbin/portmap
+RUNLEVEL=3
+PROVIDES=portmap
+
+. /etc/init.d/smgl_init
diff --git a/scripts/portsentry/portsentry b/scripts/portsentry/portsentry
new file mode 100644
index 0000000..30db1d1
--- /dev/null
+++ b/scripts/portsentry/portsentry
@@ -0,0 +1,87 @@
+#!/bin/bash
+#
+# portsentry Start the portsentry Port Scan Detector
+#
+# Authors: Craig Rowland <crowland AT psionic.com> and Tim Powers
<timp AT redhat.com>
+# Modified Feb 01, 2001: Vincent Danen <vdanen AT mandrakesoft.com>
+# Modified Jun 16, 2003: Mathieu Lubrano <mlubrano AT sourcemage.org>
+# Modified May 06, 2004: Eric Sandall <sandalle AT sourcemage.org> for
simpleinit-msb system
+#
+# chkconfig: 345 98 05
+# description: PortSentry Port Scan Detector is part of the Abacus Project \
+# suite of tools. The Abacus Project is an initiative to
release \
+# low-maintenance, generic, and reliable host based intrusion \
+# detection software to the Internet community.
+# processname: portsentry
+# configfile: /etc/portsentry/portsentry.conf
+# pidfile: /var/run/portsentry.pid
+
+# Source function library.
+. /etc/init.d/smgl_init
+
+# Check that networking is up.
+# [ ${NETWORKING} = "no" ] && exit 0
+
+PROGRAM=/usr/sbin/portsentry
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+PIDFILE=/var/run/portsentry.pid
+RETVAL=$?
+
+start (){
+ #set up the ignore file
+ SENTRYDIR=/etc/portsentry
+ TMPFILE=/tmp/portsentry.ignore.tmp
+
+ for i in `/sbin/ifconfig -a | grep inet | awk '{print $2}' | sed
's/addr://'` ; do
+ builtin echo $i >> $TMPFILE
+ done
+
+ if [ -f $SENTRYDIR/always_ignore ]; then
+ cat $SENTRYDIR/always_ignore >> $TMPFILE
+ fi
+ cp -f $TMPFILE $SENTRYDIR/portsentry.ignore
+ rm -f $TMPFILE
+
+ #check for modes defined in the config file
+ if [ -s $SENTRYDIR/portsentry.modes ] ; then
+ modes=`cut -d "#" -f 1 $SENTRYDIR/portsentry.modes`
+ else
+ modes="tcp udp"
+ fi
+ for i in $modes ; do
+ echo "Starting portsentry -$i..."
+ $PROGRAM -$i
+ RETVAL=$?
+ done
+ [ $RETVAL -eq 0 ] && touch /var/lock/portsentry
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping portsentry..."
+ kill $(pidof portsentry)
+ evaluate_retval
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/portsentry
+}
+
+restart() {
+ stop &&
+ sleep 1 &&
+ start
+}
+
+status() {
+ if [ -f $PIDFILE ]; then
+ if ps -p $(cat $PIDFILE) > /dev/null; then
+ echo "portsentry is running with Process ID(s) $(cat $PIDFILE)"
+ else
+ echo "portsentry is not running, but $PIDFILE exists"
+ exit 1
+ fi
+ else
+ echo "portsentry is not running"
+ fi
+}
diff --git a/scripts/postfix/postfix b/scripts/postfix/postfix
new file mode 100755
index 0000000..b9106ac
--- /dev/null
+++ b/scripts/postfix/postfix
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+PROGRAM=/usr/libexec/postfix/master
+RUNLEVEL=3
+PROVIDES=mta
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting ${NAME}..."
+
+ if [[ -e /etc/aliases ]]; then
+ if [[ -e /etc/aliases.db ]] && \
+ [[ ""`/usr/bin/find /etc/aliases -follow -newer /etc/aliases.db`
!= "" ]]; then
+ echo "/etc/aliases is modified. You may want to run newaliases"
+ fi
+ fi
+
+ loadproc postfix start
+}
+
+stop() {
+ echo "Stopping ${NAME}..."
+ postfix stop
+ loadproc true
+}
+
+restart() {
+ $0 stop
+ sleep 1
+ $0 start
+}
+
+reload() {
+ echo "Reloading ${NAME}..."
+ loadproc postfix reload
+}
diff --git a/scripts/postgresql/postgresql b/scripts/postgresql/postgresql
new file mode 100644
index 0000000..8b0021f
--- /dev/null
+++ b/scripts/postgresql/postgresql
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/postmaster
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/postgresql
+
+start()
+{
+ echo "Starting postmaster..."
+ cd "$DBPATH" &&
+ if [[ ! -z "$PORT" ]]; then
+ PGPORT="-p $PORT"
+ fi &&
+ if [[ $LOGFILE != syslog ]]; then
+ PGLOG="-l $LOGFILE"
+ fi &&
+ su $USER -s /bin/sh -c "pg_ctl start -D $DBPATH $PGLOG -o '$PGPORT'"
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping postmaster..."
+ cd "$DBPATH" &&
+ su $USER -s /bin/sh -c "pg_ctl stop -D $DBPATH -m fast"
+ evaluate_retval
+}
+
+reload()
+{
+ echo "Reloading postmaster configuration..."
+ cd "$DBPATH" &&
+ su $USER -s /bin/sh -c "pg_ctl reload -D $DBPATH"
+ evaluate_retval
+}
diff --git a/scripts/postgresql/postgresql.conf
b/scripts/postgresql/postgresql.conf
new file mode 100644
index 0000000..09429f0
--- /dev/null
+++ b/scripts/postgresql/postgresql.conf
@@ -0,0 +1,11 @@
+# user postgresql starts under, doesn't change unless you add the user
yourself
+USER=postgres
+
+# you initdb here
+DBPATH=/var/lib/postgres/data
+
+# this is where the logs go. Use 'syslog' if you want to log to syslog.
+LOGFILE=/var/log/postgres
+
+# Network TCP port to listen on, default is 5432
+PORT=
diff --git a/scripts/powersave/powersaved b/scripts/powersave/powersaved
new file mode 100755
index 0000000..d852cb6
--- /dev/null
+++ b/scripts/powersave/powersaved
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+RUNLEVEL=3
+PROGRAM=/usr/sbin/powersaved
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ required_executable $PROGRAM
+ echo Starting daemon...
+ $PROGRAM -d
+ evaluate_retval
+}
+
+stop()
+{
+ echo Stopping daemon...
+ pkill -f "$PROGRAM -d"
+ evaluate_retval
+}
diff --git a/scripts/privoxy/junkbuster b/scripts/privoxy/junkbuster
new file mode 100755
index 0000000..53dd1db
--- /dev/null
+++ b/scripts/privoxy/junkbuster
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/privoxy
+ARGS="/etc/privoxy/config"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+
diff --git a/scripts/prngd/prngd b/scripts/prngd/prngd
new file mode 100644
index 0000000..11050c9
--- /dev/null
+++ b/scripts/prngd/prngd
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+PIDFILE=/var/run/prng/prngd.pid
+SEEDFILE=/var/cache/prng/prngd-seed
+PROGRAM=/usr/sbin/prngd
+ARGS="-p '$PIDFILE' -s '$SEEDFILE'"
+RUNLEVEL=2
+NEEDS=''
+
+. /etc/init.d/smgl_init
+
+function start()
+{
+ mkdir -p /var/run/prng
+ mkdir -p /var/cache/prng
+ chmod 0700 /var/run/prng
+ chmod 0700 /var/cache/prng
+ echo "Starting $NAME..."
+ loadproc $PROGRAM $ARGS
+}
+
diff --git a/scripts/procps/smgl-sysctl b/scripts/procps/smgl-sysctl
new file mode 100755
index 0000000..25d86a7
--- /dev/null
+++ b/scripts/procps/smgl-sysctl
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+RUNLEVEL=S
+NEEDS="+local_fs"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+
+case $1 in
+ start) if [ -f /etc/sysctl.conf ] ; then
+ echo "Running sysctl..."
+ loadproc /sbin/sysctl -p
+ fi
+ ;;
+
+ stop) exit 0
+ ;;
+
+ *) echo "Usage: $0 {start|stop}"
+ exit 1
+ ;;
+esac
diff --git a/scripts/proftpd/proftpd b/scripts/proftpd/proftpd
new file mode 100755
index 0000000..09a4400
--- /dev/null
+++ b/scripts/proftpd/proftpd
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/proftpd
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+stop() {
+ echo "Stopping proftpd..."
+ if [ -f /var/run/proftpd.pid ]; then
+ kill `cat /var/run/proftpd.pid`
+ fi
+ evaluate_retval
+}
diff --git a/scripts/pure-ftpd/pure-ftpd b/scripts/pure-ftpd/pure-ftpd
new file mode 100755
index 0000000..44e83bc
--- /dev/null
+++ b/scripts/pure-ftpd/pure-ftpd
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/pure-ftpd
+
+PROGRAM=/usr/sbin/pure-ftpd
+ARGS="-B $CONFIG"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/pure-ftpd/pure-ftpd.conf
b/scripts/pure-ftpd/pure-ftpd.conf
new file mode 100644
index 0000000..c8855d5
--- /dev/null
+++ b/scripts/pure-ftpd/pure-ftpd.conf
@@ -0,0 +1,4 @@
+# This is the pure-ftpd config file.
+#
+# Set the CONFIG variable to pass startup parameters needed by your
pure-ftpd server.
+CONFIG="-b"
diff --git a/scripts/qmail/qmail b/scripts/qmail/qmail
new file mode 100644
index 0000000..4820461
--- /dev/null
+++ b/scripts/qmail/qmail
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+NAME=qmail-send
+PROGRAM=/var/qmail/bin/qmail-send
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+loadproc()
+{
+ if [ $# = 0 ] ; then
+ echo "Usage: loadproc {program}"
+ exit 1
+ fi
+
+ getpids $1
+
+ if [ -z "$pidlist" ] ; then
+ ( unset -f echo ; exec "$@" & )
+ evaluate_retval
+ else
+ $SET_WCOL
+ print_status warning running
+ fi
+}
+
+start()
+{
+ echo "Starting $NAME..."
+ loadproc /var/qmail/rc
+}
diff --git a/scripts/queue/queue b/scripts/queue/queue
new file mode 100644
index 0000000..5a620bd
--- /dev/null
+++ b/scripts/queue/queue
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+RUNLEVEL=3
+PROGRAM=/usr/sbin/queued
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/quota/quota b/scripts/quota/quota
new file mode 100644
index 0000000..94810ea
--- /dev/null
+++ b/scripts/quota/quota
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+
+ # Check quota and then turn quota on.
+ echo "Checking quotas. This may take some time."
+ /usr/sbin/quotacheck -avug
+ evaluate_retval
+
+ echo "Turning on quota..."
+ /usr/sbin/quotaon -avug
+ evaluate_retval
+
+}
+
+
+stop() {
+
+ echo "Turning off quota..."
+ /usr/sbin/quotaoff -avug
+ evaluate_retval
+
+}
+
+
+case "$1" in
+ start) start ;;
+ stop) stop ;;
+ *) echo "Usage: $0 {start|stop}" ;;
+esac
diff --git a/scripts/radvd/radvd b/scripts/radvd/radvd
new file mode 100644
index 0000000..5f91dea
--- /dev/null
+++ b/scripts/radvd/radvd
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/radvd
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo -n "Starting radvd..."
+
+ if [ -f /proc/sys/net/ipv6/conf/all/forwarding ] ; then
+ echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
+ fi
+
+ $PROGRAM
+
+ ITER=0
+ while [ ! -e /var/run/radvd.pid ] && [ "$ITER" -lt 10 ] ; do sleep 1; echo
-n . ;ITER=$((++ITER)); done
+ echo
+ if [ -e /var/run/radvd.pid ]; then
+ ps -p `cat /var/run/radvd.pid` > /dev/null && evaluate_retval
+ else
+ print_status failure
+ exit 1
+ fi
+}
+
+reload() {
+ # reloadproc causes loss of connection when remotely connected
+ echo "Reloading sshd..."
+ if [ -e /var/run/radvd.pid ]; then
+ kill -TERM `cat /var/run/radvd.pid`
+ sleep 1
+ fi
+ $0 start
+}
diff --git a/scripts/resin/resin b/scripts/resin/resin
new file mode 100755
index 0000000..e4209f0
--- /dev/null
+++ b/scripts/resin/resin
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+PIDFILE=/var/run/resin.pid
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting Resin Application server..."
+ /opt/resin/bin/httpd.sh 2>/dev/null &
+ evaluate_retval
+}
+
+restart()
+{
+ echo "Restarting Resin Application server..."
+ if [ -f $PIDFILE ]; then
+ /opt/resin/bin/httpd.sh restart
+ evaluate_retval
+ else
+ run_func start
+ fi
+}
+
+stop()
+{
+ echo "Stopping Resin Application server..."
+ /opt/resin/bin/httpd.sh stop
+ evaluate_retval
+}
diff --git a/scripts/rng-tools/rngd b/scripts/rng-tools/rngd
new file mode 100644
index 0000000..388e7ed
--- /dev/null
+++ b/scripts/rng-tools/rngd
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/rngd
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
diff --git a/scripts/rplay/rplay b/scripts/rplay/rplay
new file mode 100755
index 0000000..dbbc5d3
--- /dev/null
+++ b/scripts/rplay/rplay
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/rplayd
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+reload() {
+ /usr/bin/rplay --reset
+}
diff --git a/scripts/rsyslog/rsyslog b/scripts/rsyslog/rsyslog
new file mode 100644
index 0000000..2900757
--- /dev/null
+++ b/scripts/rsyslog/rsyslog
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+. /etc/sysconfig/rsyslog
+
+PIDFILE=/var/run/rsyslogd.pid
+PROGRAM=/usr/sbin/rsyslogd
+ARGS="-c${COMPAT}"
+RUNLEVEL=S
+NEEDS="+local_fs"
+PROVIDES=syslog
+
+if ! [[ -z ${RSYSLOG_CONFIG} ]]; then
+ ARGS="${ARGS} -f ${RSYSLOG_CONFIG}"
+fi
+
+. /etc/init.d/smgl_init
diff --git a/scripts/rsyslog/rsyslog.conf b/scripts/rsyslog/rsyslog.conf
new file mode 100644
index 0000000..b6e37de
--- /dev/null
+++ b/scripts/rsyslog/rsyslog.conf
@@ -0,0 +1,6 @@
+# Configuration compatibility
+VERSION=$(/usr/sbin/rsyslogd -v | head -n1 | gawk '{print $2}' | sed -e
's/,//')
+COMPAT=${VERSION:0:1}
+
+# Full path to configuration file (and its filename)
+RSYSLOG_CONFIG="/etc/rsyslog.conf"
diff --git a/scripts/rtirq/rtirq b/scripts/rtirq/rtirq
new file mode 100644
index 0000000..3571f20
--- /dev/null
+++ b/scripts/rtirq/rtirq
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS=
+PROGRAM=/usr/bin/rtirq.sh
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Modifying IRQ thread priorities..."
+ $PROGRAM start
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping script..."
+ $PROGRAM stop
+ evaluate_retval
+}
+
+status()
+{
+ $PROGRAM status
+}
diff --git a/scripts/samba/samba b/scripts/samba/samba
new file mode 100644
index 0000000..ca653d3
--- /dev/null
+++ b/scripts/samba/samba
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+remote_fs"
+ARGS="-D"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ if [ ! -e /var/run/samba ]; then
+ mkdir /var/run/samba
+ fi &&
+ if ! netstat -l --udp | grep -q netbios-ns ; then
+ echo "Starting NetBIOS nameserver ..."
+ loadproc /usr/sbin/nmbd ${ARGS}
+ evaluate_retval
+ fi &&
+ if ! netstat -l --tcp | grep -q netbios-ssn ; then
+ echo "Starting NetBIOS sessions ..."
+ loadproc /usr/sbin/smbd ${ARGS}
+ evaluate_retval
+ fi
+}
+#
+stop()
+{
+ if netstat -l --udp | grep -q netbios-ns ; then
+ if ps -C nmbd | grep -q nmbd ; then
+ echo "Stopping NetBIOS nameserver ..."
+ killproc /usr/sbin/nmbd
+ evaluate_retval
+ fi
+ fi &&
+ if netstat -l --tcp | grep -q netbios-ssn ; then
+ if ps -C smbd | grep -q smbd; then
+ echo "Stopping NetBIOS sessions ..."
+ killproc /usr/sbin/smbd
+ evaluate_retval
+ fi
+ fi
+}
+#
+status()
+{
+ if netstat -l --udp | grep -q netbios-ns ; then
+ if ! ps -C nmbd | grep -q nmbd; then
+ echo "NetBIOS nameserver : xinetd"
+ evaluate_retval
+ fi
+ if ps -C nmbd | grep -q nmbd; then
+ echo "NetBIOS nameserver : daemon"
+ evaluate_retval
+ fi
+ fi &&
+ if netstat -l --tcp | grep -q netbios-ssn ; then
+ if ! ps -C smbd | grep -q smbd ; then
+ echo "NetBIOS sessions : xinetd"
+ evaluate_retval
+ fi
+ if ps -C smbd | grep -q smbd ; then
+ echo "NetBIOS sessions : daemon"
+ evaluate_retval
+ fi
+ fi
+}
+
+restart(){
+
+ stop &&
+
+ start
+}
diff --git a/scripts/scanlogd/scanlogd b/scripts/scanlogd/scanlogd
new file mode 100755
index 0000000..556d362
--- /dev/null
+++ b/scripts/scanlogd/scanlogd
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+RUNLEVEL=3
+NEEDS="+remote_fs"
+PROGRAM=/usr/sbin/scanlogd
+
+. /etc/init.d/smgl_init
diff --git a/scripts/scim/scim b/scripts/scim/scim
new file mode 100755
index 0000000..389e636
--- /dev/null
+++ b/scripts/scim/scim
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PROGRAM="/usr/bin/scim"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting scim..."
+ /usr/bin/scim -f socket -ns socked -d > /dev/null &&
+ /usr/bin/scim -f x11 -s socket -c socket -d > /dev/null
+ evaluate_retval
+}
+
+stop() {
+ if pidof scim > /dev/null ; then
+ echo "Stopping scim..."
+ killproc /usr/bin/scim > /dev/null
+ evaluate_retval
+ fi
+}
+
+restart() {
+ stop &&
+ start
+}
diff --git a/scripts/scmpc/scmpc b/scripts/scmpc/scmpc
new file mode 100644
index 0000000..5e27a86
--- /dev/null
+++ b/scripts/scmpc/scmpc
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+PIDFILE=/var/run/scmpc.pid
+PROGRAM=/usr/bin/scmpc
+RUNLEVEL=3
+NEEDS="+network mpd"
+
+. /etc/init.d/smgl_functions
+
+if ! [[ -f /etc/scmpc.conf ]]; then
+ echo "Configuration file /etc/scmpc.conf does not exist."
+ print_status failure
+fi
+
+. /etc/init.d/smgl_init
diff --git a/scripts/sendmail/sendmail b/scripts/sendmail/sendmail
new file mode 100644
index 0000000..b8e3157
--- /dev/null
+++ b/scripts/sendmail/sendmail
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+ARGS=" -bd -q30m"
+PROGRAM="/usr/sbin/sendmail"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/setserial/smgl-setserial
b/scripts/setserial/smgl-setserial
new file mode 100755
index 0000000..f490a43
--- /dev/null
+++ b/scripts/setserial/smgl-setserial
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+PROGRAM=/bin/setserial
+RUNLEVEL=2
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting setserial..."
+ if [ -f /etc/serial.conf ]; then
+ while read device args; do
+ if [ "${device:0:1}" == "#" -o "$device" = "" ]; then continue; fi
+ $PROGRAM -z $device $args
+ done < /etc/serial.conf
+ fi
+}
+
+stop() {
+ exit 0
+}
+
+status() {
+ usage
+}
+
+reload()
+{
+ _restart
+}
+
+usage()
+{
+ echo "Usage: $0 {start|stop|restart|reload}"
+}
diff --git a/scripts/sfs/sfs-client b/scripts/sfs/sfs-client
new file mode 100755
index 0000000..591fb3d
--- /dev/null
+++ b/scripts/sfs/sfs-client
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/sfscd
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/sfs/sfs-server b/scripts/sfs/sfs-server
new file mode 100755
index 0000000..fa73556
--- /dev/null
+++ b/scripts/sfs/sfs-server
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/sfssd
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/shorewall-common/shorewall
b/scripts/shorewall-common/shorewall
new file mode 100644
index 0000000..3379f8f
--- /dev/null
+++ b/scripts/shorewall-common/shorewall
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+RUNLEVEL=3
+PROGRAM=/sbin/shorewall
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/shorewall
+
+start()
+{
+ # Shorewall needs /var/log/messages to exist
+ if [[ ! -f /var/log/messages ]]
+ then
+ touch /var/log/messages
+ fi &&
+ # Create shorewall log file if it doesn't exist
+ if [[ ! -f $SHOREWALL_LOG ]]
+ then
+ touch $SHOREWALL_LOG
+ fi &&
+ # Shorewall needs subsys
+ if [[ ! -d /var/lock/subsys/ ]]
+ then
+ mkdir -p /var/lock/subsys/
+ fi &&
+ echo Starting Shorewall... &&
+ ( unset -f echo; date "$DATE_FORMAT" >> $SHOREWALL_LOG 2>&1 ; ) &&
+ ( unset -f echo; ${PROGRAM} start >> $SHOREWALL_LOG 2>&1 ; )
+}
+
+stop()
+{
+ echo Stopping Shorewall... &&
+ ( unset -f echo; date "$DATE_FORMAT" >> $SHOREWALL_LOG 2>&1 ; ) &&
+ ( unset -f echo; ${PROGRAM} stop >> $SHOREWALL_LOG 2>&1 ; )
+}
+
+status()
+{
+ ( unset -f echo; ${PROGRAM} status ; )
+}
+
+reload()
+{
+ ( unset -f echo; ${PROGRAM} refresh ; )
+}
diff --git a/scripts/shorewall-common/shorewall.conf
b/scripts/shorewall-common/shorewall.conf
new file mode 100644
index 0000000..e1b712f
--- /dev/null
+++ b/scripts/shorewall-common/shorewall.conf
@@ -0,0 +1,5 @@
+# Full path to the log file.
+SHOREWALL_LOG=/var/log/shorewall.log
+
+# As described in 'man date'. The value must begin with a + symbol.
+DATE_FORMAT="+%F %T"
diff --git a/scripts/shorewall-lite/shorewall
b/scripts/shorewall-lite/shorewall
new file mode 100644
index 0000000..3379f8f
--- /dev/null
+++ b/scripts/shorewall-lite/shorewall
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+RUNLEVEL=3
+PROGRAM=/sbin/shorewall
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/shorewall
+
+start()
+{
+ # Shorewall needs /var/log/messages to exist
+ if [[ ! -f /var/log/messages ]]
+ then
+ touch /var/log/messages
+ fi &&
+ # Create shorewall log file if it doesn't exist
+ if [[ ! -f $SHOREWALL_LOG ]]
+ then
+ touch $SHOREWALL_LOG
+ fi &&
+ # Shorewall needs subsys
+ if [[ ! -d /var/lock/subsys/ ]]
+ then
+ mkdir -p /var/lock/subsys/
+ fi &&
+ echo Starting Shorewall... &&
+ ( unset -f echo; date "$DATE_FORMAT" >> $SHOREWALL_LOG 2>&1 ; ) &&
+ ( unset -f echo; ${PROGRAM} start >> $SHOREWALL_LOG 2>&1 ; )
+}
+
+stop()
+{
+ echo Stopping Shorewall... &&
+ ( unset -f echo; date "$DATE_FORMAT" >> $SHOREWALL_LOG 2>&1 ; ) &&
+ ( unset -f echo; ${PROGRAM} stop >> $SHOREWALL_LOG 2>&1 ; )
+}
+
+status()
+{
+ ( unset -f echo; ${PROGRAM} status ; )
+}
+
+reload()
+{
+ ( unset -f echo; ${PROGRAM} refresh ; )
+}
diff --git a/scripts/shorewall-lite/shorewall.conf
b/scripts/shorewall-lite/shorewall.conf
new file mode 100644
index 0000000..e1b712f
--- /dev/null
+++ b/scripts/shorewall-lite/shorewall.conf
@@ -0,0 +1,5 @@
+# Full path to the log file.
+SHOREWALL_LOG=/var/log/shorewall.log
+
+# As described in 'man date'. The value must begin with a + symbol.
+DATE_FORMAT="+%F %T"
diff --git a/scripts/silc-server/smgl-silcd b/scripts/silc-server/smgl-silcd
new file mode 100755
index 0000000..aac6c41
--- /dev/null
+++ b/scripts/silc-server/smgl-silcd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/silcd
+RUNLEVEL=3
+NEED="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/slim/slim b/scripts/slim/slim
new file mode 100755
index 0000000..3bb6ae1
--- /dev/null
+++ b/scripts/slim/slim
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+
+PROGRAM=/usr/bin/slim
+ARGS="-d"
+RUNLEVEL=5
+PROVIDES=display_manager
+
+. /etc/init.d/smgl_init
diff --git a/scripts/smartmontools/smartd b/scripts/smartmontools/smartd
new file mode 100755
index 0000000..c356099
--- /dev/null
+++ b/scripts/smartmontools/smartd
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/smartd
+PROGRAM_FLAGS="-p /var/run/smartd.pid"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo -n "Starting smartd..."
+ $PROGRAM $PROGRAM_FLAGS
+ ITER=0
+ while [ ! -e /var/run/smartd.pid ] && [ "$ITER" -lt 10 ] ; do sleep 1;
echo -n . ;ITER=$((++ITER)); done
+ echo
+ if [ -e /var/run/smartd.pid ]; then
+ ps -p `cat /var/run/smartd.pid` > /dev/null && evaluate_retval
+ else
+ print_status failure
+ exit 1
+ fi
+}
+
+reload() {
+ # reloadproc causes loss of connection when remotely connected
+ echo "Reloading smartd..."
+ if [ -e /var/run/smartd.pid ]; then
+ kill `cat /var/run/smartd.pid`
+ sleep 1
+ fi
+ $0 start
+}
+
+restart() {
+ run_func reload
+}
+
+stop() {
+ # reloadproc causes loss of connection when remotely connected
+ echo "Stopping smartd..."
+ if [ -e /var/run/smartd.pid ]; then
+ kill `cat /var/run/smartd.pid`
+ sleep 1
+ fi
+}
+
diff --git a/scripts/snort/snort b/scripts/snort/snort
new file mode 100644
index 0000000..a144398
--- /dev/null
+++ b/scripts/snort/snort
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/snort
+
+PROGRAM=/usr/bin/snort
+ARGS="-D -u snort -g snort -c /etc/snort/snort.conf -i ${IFACE} ${OPTIONS}"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/snort/snort.conf b/scripts/snort/snort.conf
new file mode 100644
index 0000000..d21340a
--- /dev/null
+++ b/scripts/snort/snort.conf
@@ -0,0 +1,5 @@
+# Interface snort should listen to.
+IFACE=eth0
+
+# Additional options passed to the snort program at start.
+OPTIONS=
diff --git a/scripts/spamassassin/assassin b/scripts/spamassassin/assassin
new file mode 100644
index 0000000..1ec24e2
--- /dev/null
+++ b/scripts/spamassassin/assassin
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/spamd
+ARGS="-d -u mail -l"
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/spfs/spfs b/scripts/spfs/spfs
new file mode 100755
index 0000000..248ac2c
--- /dev/null
+++ b/scripts/spfs/spfs
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/ufs
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/spfs
+
+function start()
+{
+ echo "Starting spfs..."
+ ufs $ARGS &
+ echo $! >/var/run/spfs.pid
+}
+
+function stop()
+{
+ echo "Stoping spfs..."
+ kill -15 $(cat /var/run/spfs.pid) &> /dev/null
+ sleep 2
+ kill -9 $(cat /var/run/spfs.pid) &> /dev/null
+ rm /var/run/spfs.pid
+}
+
diff --git a/scripts/spfs/spfs.conf b/scripts/spfs/spfs.conf
new file mode 100644
index 0000000..869a9a1
--- /dev/null
+++ b/scripts/spfs/spfs.conf
@@ -0,0 +1 @@
+ARGS=""
diff --git a/scripts/splashy/splashy b/scripts/splashy/splashy
new file mode 100755
index 0000000..23a5fbe
--- /dev/null
+++ b/scripts/splashy/splashy
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+#grep -q -e '[[:space:]]splash\([[:space:]]\|$\)' /proc/cmdline || exit 1
+
+PROGRAM=/usr/sbin/splashy
+ARGS=boot
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/splashy/splashy1 b/scripts/splashy/splashy1
new file mode 100755
index 0000000..dce8159
--- /dev/null
+++ b/scripts/splashy/splashy1
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+PROGRAM=/bin/false
+RUNLEVEL=1
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+MAX_LEVEL=$DEFAULT_RUNLEVEL
+
+case "$MAX_LEVEL" in
+ 1)
+ SPLASHY_PROGRESS=100
+ ;;
+ 2)
+ SPLASHY_PROGRESS=50
+ ;;
+ 3)
+ SPLASHY_PROGRESS=33
+ ;;
+ 4)
+ SPLASHY_PROGRESS=25
+ ;;
+ 5)
+ SPLASHY_PROGRESS=20
+ ;;
+ *)
+ echo "Unknown default runlevel"
+ exit 1
+esac
+
+start()
+{
+ /usr/sbin/splashy_update "progress $SPLASHY_PROGRESS"
+}
+
+stop()
+{
+ true
+}
+
+restart()
+{
+ true
+}
diff --git a/scripts/splashy/splashy2 b/scripts/splashy/splashy2
new file mode 100755
index 0000000..1e4aa30
--- /dev/null
+++ b/scripts/splashy/splashy2
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+PROGRAM=/bin/false
+RUNLEVEL=2
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+MAX_LEVEL=$DEFAULT_RUNLEVEL
+
+case "$MAX_LEVEL" in
+ 2)
+ SPLASHY_PROGRESS=100
+ ;;
+ 3)
+ SPLASHY_PROGRESS=66
+ ;;
+ 4)
+ SPLASHY_PROGRESS=50
+ ;;
+ 5)
+ SPLASHY_PROGRESS=40
+ ;;
+ *)
+ echo "Unknown default runlevel"
+ exit 1
+esac
+
+start()
+{
+ /usr/sbin/splashy_update "progress $SPLASHY_PROGRESS"
+}
+
+stop()
+{
+ true
+}
+
+restart()
+{
+ true
+}
diff --git a/scripts/splashy/splashy3 b/scripts/splashy/splashy3
new file mode 100755
index 0000000..ee5c6da
--- /dev/null
+++ b/scripts/splashy/splashy3
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+MAX_LEVEL=$DEFAULT_RUNLEVEL
+
+case "$MAX_LEVEL" in
+ 3)
+ SPLASHY_PROGRESS=100
+ ;;
+ 4)
+ SPLASHY_PROGRESS=75
+ ;;
+ 5)
+ SPLASHY_PROGRESS=60
+ ;;
+ *)
+ echo "Unknown default runlevel"
+ exit 1
+esac
+
+start()
+{
+ /usr/sbin/splashy_update "progress $SPLASHY_PROGRESS"
+}
+
+stop()
+{
+ true
+}
+
+restart()
+{
+ true
+}
diff --git a/scripts/splashy/splashy4 b/scripts/splashy/splashy4
new file mode 100755
index 0000000..1ae6dc1
--- /dev/null
+++ b/scripts/splashy/splashy4
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+PROGRAM=/bin/false
+RUNLEVEL=4
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+MAX_LEVEL=$DEFAULT_RUNLEVEL
+
+case "$MAX_LEVEL" in
+ 4)
+ SPLASHY_PROGRESS=100
+ ;;
+ 5)
+ SPLASHY_PROGRESS=80
+ ;;
+ *)
+ echo "Unknown default runlevel"
+ exit 1
+esac
+
+start()
+{
+ /usr/sbin/splashy_update "progress $SPLASHY_PROGRESS"
+}
+
+stop()
+{
+ true
+}
+
+restart()
+{
+ true
+}
diff --git a/scripts/splashy/splashy5 b/scripts/splashy/splashy5
new file mode 100755
index 0000000..ba446ca
--- /dev/null
+++ b/scripts/splashy/splashy5
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+PROGRAM=/bin/false
+RUNLEVEL=5
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/init
+
+MAX_LEVEL=$DEFAULT_RUNLEVEL
+
+case "$MAX_LEVEL" in
+ 5)
+ SPLASHY_PROGRESS=100
+ ;;
+ *)
+ echo "Unknown default runlevel"
+ exit 1
+esac
+
+start()
+{
+ /usr/sbin/splashy_update "progress $SPLASHY_PROGRESS"
+}
+
+stop()
+{
+ true
+}
+
+restart()
+{
+ true
+}
diff --git a/scripts/squid/squid b/scripts/squid/squid
new file mode 100644
index 0000000..8d02d4f
--- /dev/null
+++ b/scripts/squid/squid
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/squid
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting squid..."
+ /usr/sbin/squid -z -F > /dev/null 2>&1
+ loadproc /usr/sbin/squid
+}
+
+reload()
+{
+ echo "Reloading squid..."
+ /usr/sbin/squid -k reconfigure > /dev/null 2>&1
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping squid..."
+ /usr/sbin/squid -k shutdown > /dev/null 2>&1
+ evaluate_retval
+}
diff --git a/scripts/synergy/smgl-synergy b/scripts/synergy/smgl-synergy
new file mode 100755
index 0000000..31cfade
--- /dev/null
+++ b/scripts/synergy/smgl-synergy
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+. /etc/sysconfig/synergy
+
+PROGRAM=/usr/bin/synergys
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting smgl-synergy..."
+ ${PROGRAM} -a "$SYNERGY_ADDRESS" -n "$SYNERGY_NAME" \
+ --config "$SYNERGY_CONFIG" --no-restart
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Stopping smgl-synergy..."
+ pkill synergys
+ evaluate_retval
+}
diff --git a/scripts/synergy/synergy.conf b/scripts/synergy/synergy.conf
new file mode 100644
index 0000000..24d9965
--- /dev/null
+++ b/scripts/synergy/synergy.conf
@@ -0,0 +1,21 @@
+#
+# Synergy server config
+#
+# This config by default will not allow external connections
+# and so is useless (but secure) ;)
+#
+
+#
+# Listen for clients on the given address
+#
+SYNERGY_ADDRESS=localhost:24800
+
+#
+# Use screen-name instead of hostname to identify this screen
+#
+SYNERGY_NAME=$HOSTNAME
+
+#
+# Location of Synergy config file
+#
+SYNERGY_CONFIG=/etc/synergy.conf
diff --git a/scripts/sysklogd/sysklogd b/scripts/sysklogd/sysklogd
new file mode 100644
index 0000000..cb4b44e
--- /dev/null
+++ b/scripts/sysklogd/sysklogd
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+RUNLEVEL=S
+NEEDS="+local_fs"
+PROVIDES=syslog
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/sysklogd
+
+case $1 in
+ start) echo "Starting system log daemon..."
+ loadproc /sbin/syslogd -m 60 $SYSLOGD_OPTS
+ echo "Starting kernel log daemon..."
+ loadproc /sbin/klogd $KLOGD_OPTS
+ ;;
+
+ restart) $0 stop
+ $0 start
+ ;;
+
+ stop) echo "Stopping kernel log daemon..."
+ killproc /sbin/klogd
+ echo "Stopping system log daemon..."
+ killproc /sbin/syslogd
+ ;;
+
+ status) statusproc /sbin/syslogd
+ statusproc /sbin/klogd
+ ;;
+
+ *) echo "Usage: $0 {start|stop|restart|status}"
+ ;;
+esac
diff --git a/scripts/sysklogd/sysklogd.conf b/scripts/sysklogd/sysklogd.conf
new file mode 100644
index 0000000..9ea2bbc
--- /dev/null
+++ b/scripts/sysklogd/sysklogd.conf
@@ -0,0 +1,5 @@
+# options to pass to syslogd
+SYSLOGD_OPTS=""
+
+# options to pass to klogd
+KLOGD_OPTS=""
diff --git a/scripts/syslog-ng/syslog-ng b/scripts/syslog-ng/syslog-ng
new file mode 100644
index 0000000..dee534a
--- /dev/null
+++ b/scripts/syslog-ng/syslog-ng
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/sbin/syslog-ng
+RUNLEVEL=S
+NEEDS="+local_fs"
+PROVIDES=syslog
+
+. /etc/init.d/smgl_init
diff --git a/scripts/system-tools-backends/system-tools-backends
b/scripts/system-tools-backends/system-tools-backends
new file mode 100644
index 0000000..0c23dab
--- /dev/null
+++ b/scripts/system-tools-backends/system-tools-backends
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM="/usr/bin/system-tools-backends"
+RUNLEVEL=5
+NEEDS="smgl-messagebus"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/thttpd/thttpd b/scripts/thttpd/thttpd
new file mode 100644
index 0000000..cd9333c
--- /dev/null
+++ b/scripts/thttpd/thttpd
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+
+PROGRAM="/usr/sbin/thttpd"
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/thttpd
+
+start() {
+ echo "Starting thttpd..."
+ local $HTARGLIST
+ if [ -n "$HTHOST" ] ; then HTARGLIST="$HTARGLIST -h $HTHOST"; fi
+ if [ -n "$HTPORT" ] ; then HTARGLIST="$HTARGLIST -p $HTPORT"; fi
+ if [ -n "$HTDOCS" ] ; then HTARGLIST="$HTARGLIST -d $HTDOCS"; fi
+ if [ -n "$HTUSER" ] ; then HTARGLIST="$HTARGLIST -u $HTUSER"; fi
+ if [ -n "$HTPIDF" ] ; then HTARGLIST="$HTARGLIST -i $HTPIDF"; fi
+ if [ -n "$HTCGIP" ] ; then HTARGLIST="$HTARGLIST -c $HTCGIP"; fi
+ if [ -n "$HTLOGF" ] ; then HTARGLIST="$HTARGLIST -l $HTLOGF"; fi
+ if [ "$HTCHROOT" == "yes" ] ; then HTARGLIST="$HTARGLIST -r" ; fi
+ if [ "$HTVHOST" == "yes" ] ; then HTARGLIST="$HTARGLIST -v" ; fi
+ if [ -n "$HTARGS" ] ; then HTARGLIST="$HTARGLIST $HTARGS"; fi
+ $PROGRAM $HTARGLIST
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping thttpd..."
+ if [ -e $HTPIDF ]; then
+ kill `cat $HTPIDF` 2> /dev/null
+ true
+ evaluate_retval
+ rm -f $HTPIDF
+ else
+ false
+ evaluate_retval
+ fi
+}
diff --git a/scripts/thttpd/thttpd.conf b/scripts/thttpd/thttpd.conf
new file mode 100644
index 0000000..9951d30
--- /dev/null
+++ b/scripts/thttpd/thttpd.conf
@@ -0,0 +1,31 @@
+
+# where the hypertext documents are located
+HTDOCS=/usr/www
+
+# what hostname to bind to (all if empty)
+HTHOST=
+
+# what port to bind to
+HTPORT=80
+
+# user thttpd runs under
+HTUSER=nobody
+
+# thttpd pid file
+HTPIDF=/var/run/thttpd.pid
+
+# cgipattern for thttpd
+HTCGIP='**.cgi|/errors/*'
+
+# thttpd log file
+HTLOGF=/var/log/thttpd.log
+
+# more args to pass thttpd
+HTARGS=
+
+# put yes here if you want to chroot
+HTCHROOT=yes
+
+# put yes for el-cheapo virtual hosting
+HTVHOST=no
+
diff --git a/scripts/udev-old/coldplug b/scripts/udev-old/coldplug
new file mode 100644
index 0000000..cebfb79
--- /dev/null
+++ b/scripts/udev-old/coldplug
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=DEV
+ESSENTIAL=yes
+NEEDS="udevd"
+
+# source function library
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Populating /dev with existing devices"
+ /sbin/udevtrigger
+ # Wait for udev events
+ /sbin/udevsettle --timeout=60
+}
+
+stop() { exit 0; }
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+status() { exit 3; }
diff --git a/scripts/udev-old/udevd b/scripts/udev-old/udevd
new file mode 100755
index 0000000..9942271
--- /dev/null
+++ b/scripts/udev-old/udevd
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PROGRAM=/sbin/udevd
+ARGS="--daemon"
+RUNLEVEL=DEV
+ESSENTIAL=yes
+NEEDS="devices"
+
+. /etc/init.d/smgl_init
+
+
diff --git a/scripts/udev/coldplug b/scripts/udev/coldplug
new file mode 100755
index 0000000..0f38ba6
--- /dev/null
+++ b/scripts/udev/coldplug
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=DEV
+ESSENTIAL=yes
+NEEDS="udevd"
+
+# source function library
+. /etc/init.d/smgl_init
+. /etc/sysconfig/devices
+
+start()
+{
+ if [[ $DEVICES = udev ]]; then
+ echo "Triggering kernel device uevents..."
+ /sbin/udevadm trigger
+ evaluate_retval
+ echo "Waiting for all events to be handled..."
+ /sbin/udevadm settle --timeout=60
+ fi
+ evaluate_retval
+}
+
+stop() { exit 0; }
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+status() { exit 3; }
diff --git a/scripts/udev/copy-persistent-rules
b/scripts/udev/copy-persistent-rules
new file mode 100755
index 0000000..c55ba99
--- /dev/null
+++ b/scripts/udev/copy-persistent-rules
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+PROGRAM=/bin/false
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ for rules in /dev/.udev/tmp-rules--*; do
+ persistent_rules=${rules#/dev/.udev/tmp-rules--}
+ if [ -e "$rules" -a ! -e "/etc/udev/rules.d/$persistent_rules" ]; then
+ echo "Copying persistent rules to /etc/udev/rules.d/$persistent_rules"
+ cp $rules /etc/udev/rules.d/$persistent_rules
+ fi
+ evaluate_retval
+ done
+}
+
+stop() { exit 0; }
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+status() { exit 3; }
+
+usage()
+{
+ echo "Usage: $0 {start|stop}"
+}
diff --git a/scripts/udev/udevd b/scripts/udev/udevd
new file mode 100755
index 0000000..970089b
--- /dev/null
+++ b/scripts/udev/udevd
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+PROGRAM=/sbin/udevd
+ARGS="--daemon"
+RUNLEVEL=DEV
+ESSENTIAL=yes
+NEEDS="devices"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/ulogd/ulogd b/scripts/ulogd/ulogd
new file mode 100644
index 0000000..7ace53c
--- /dev/null
+++ b/scripts/ulogd/ulogd
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/ulogd
+ARGS="-d"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+status()
+{
+ getpids ulogd
+ if [ -n "$pidlist" ]; then
+ echo "ulogd is running with Process ID(s) $pidlist"
+ else
+ echo "ulogd is not running"
+ fi
+}
+
+start()
+{
+ echo "Starting ulogd...\n"
+ if [ ! -d /var/log/ulogd ] ; then
+ mkdir -p /var/log/ulogd
+ fi
+ $PROGRAM $ARGS
+ evaluate_retval
+ touch /var/lock/subsys/ulogd
+}
+
+stop()
+{
+ echo "Shutting down ulogd...\n"
+ killall ulogd
+ evaluate_retval
+ rm -f /var/lock/subsys/ulogd
+}
diff --git a/scripts/uptimec/uptimec b/scripts/uptimec/uptimec
new file mode 100755
index 0000000..ddb34f5
--- /dev/null
+++ b/scripts/uptimec/uptimec
@@ -0,0 +1,10 @@
+#!/bin/bash
+. /etc/sysconfig/uptimec
+
+PROGRAM=/usr/bin/uptimec
+ARGS="-i ${UPTIMEC_HID} -p ${UPTIMEC_PASSWORD}"
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
diff --git a/scripts/uptimec/uptimec.conf b/scripts/uptimec/uptimec.conf
new file mode 100644
index 0000000..820833c
--- /dev/null
+++ b/scripts/uptimec/uptimec.conf
@@ -0,0 +1,7 @@
+#You need to create an account on http://www.mreriksson.net/uptimes/
+#and copy the ID and PASSWORD into these fields
+#Host ID
+UPTIMEC_HID=
+
+#Password
+UPTIMEC_PASSWORD=
diff --git a/scripts/uptimed/smgl-uptimed-bootid
b/scripts/uptimed/smgl-uptimed-bootid
new file mode 100755
index 0000000..dd67ef9
--- /dev/null
+++ b/scripts/uptimed/smgl-uptimed-bootid
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ /sbin/uptimed -b
+}
+
+stop()
+{
+ exit 0
+}
+
+restart() { exit 3; }
+reload() { exit 3; }
+force_reload() { exit 3; }
+status() { exit 3; }
+
+usage()
+{
+ echo "Usage: $0 {start|stop}"
+ echo "Warning: This script should only be run once after boot!"
+}
diff --git a/scripts/uptimed/uptimed b/scripts/uptimed/uptimed
new file mode 100644
index 0000000..1d7fa4c
--- /dev/null
+++ b/scripts/uptimed/uptimed
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+PROGRAM=/sbin/uptimed
+ARGS="-i 60 -p /var/run/uptimed"
+RUNLEVEL=S
+NEEDS="smgl-uptimed-bootid"
+
+if [ ! -d /var/spool/uptimed ]
+then
+ mkdir -p /var/spool/uptimed
+fi
+
+. /etc/init.d/smgl_init
diff --git a/scripts/util-linux/hwclock.conf b/scripts/util-linux/hwclock.conf
new file mode 100644
index 0000000..21adae1
--- /dev/null
+++ b/scripts/util-linux/hwclock.conf
@@ -0,0 +1,2 @@
+# does the hardware clock store the time in UTC
+UTC=yes
diff --git a/scripts/util-linux/hwclock.sh b/scripts/util-linux/hwclock.sh
new file mode 100755
index 0000000..1db8684
--- /dev/null
+++ b/scripts/util-linux/hwclock.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+PROGRAM=/sbin/hwclock
+RUNLEVEL=S
+NEEDS="+local_fs"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/hwclock
+
+ tz_arg="--localtime"
+[ "$UTC" = "yes" ] && tz_arg="--utc"
+
+test -x /sbin/hwclock || exit 5
+
+start()
+{
+ echo "Setting System Time using the Hardware Clock..."
+ $PROGRAM --hctosys $tz_arg
+ evaluate_retval
+}
+
+stop()
+{
+ echo "Setting the Hardware Clock to the current System Time..."
+ $PROGRAM --systohc $tz_arg
+ evaluate_retval
+}
+
+adjust()
+{
+ echo "Adjusting the Hardware Clock to account for drift..."
+ $PROGRAM --adjust
+ evaluate_retval
+}
+
+show()
+{
+ echo "Show Hardware Clock time."
+ $PROGRAM --show
+}
diff --git a/scripts/vixie-cron/crond b/scripts/vixie-cron/crond
new file mode 100644
index 0000000..55e0c62
--- /dev/null
+++ b/scripts/vixie-cron/crond
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/cron
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
diff --git a/scripts/vsftpd/vsftpd b/scripts/vsftpd/vsftpd
new file mode 100755
index 0000000..b98f8ab
--- /dev/null
+++ b/scripts/vsftpd/vsftpd
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/vsftpd
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting vsftpd..."
+ $PROGRAM &
+ evaluate_retval
+}
+
diff --git a/scripts/vtun/vtun b/scripts/vtun/vtun
new file mode 100644
index 0000000..7f16568
--- /dev/null
+++ b/scripts/vtun/vtun
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/vtund
+ARGS="-s"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+. /etc/sysconfig/vtun
+
+unconfigured()
+{
+ cat <<EOF
+##############################################################
+WARNING WARNING WARNING WARNING WARNING WARNING
+
+Vtund has not been configured yet, and will not be started
+at boot for fear of opening a security hole.
+
+Please check /etc/vtund.conf, and once you're happy with
+the config, change CONFIGURED=no to CONFIGURED=yes in
+/etc/init.d/vtund
+
+##############################################################
+EOF
+
+ exit 1
+}
+
+start()
+{
+ [ "$CONFIGURED" != "yes" ] && unconfigured
+ _start
+}
+
+reload()
+{
+ [ "$CONFIGURED" != "yes" ] && unconfigured
+ _reload
+}
diff --git a/scripts/vtun/vtun.conf b/scripts/vtun/vtun.conf
new file mode 100644
index 0000000..bd2defc
--- /dev/null
+++ b/scripts/vtun/vtun.conf
@@ -0,0 +1,4 @@
+# vtund won't start until you change this value to yes.
+# Please make sure you've configured /etc/vtund.conf, then
+# change this value.
+CONFIGURED=no
diff --git a/scripts/watchdog/watchdog b/scripts/watchdog/watchdog
new file mode 100644
index 0000000..e1de559
--- /dev/null
+++ b/scripts/watchdog/watchdog
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/sysconfig/watchdog
+
+PROGRAM=/usr/sbin/watchdog
+ARGS="$WD_OPTS"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting watchdog..."
+ if [ -e /dev/misc/watchdog ] || [ -e /dev/misc/temperature ]; then
+ [ -e /dev/watchdog ] || ln -sf $DEVICES/misc/watchdog /dev/watchdog
+ [ -e /dev/temperature ] || ln -sf $DEVICES/misc/temperature
/dev/temperature
+ else
+ echo "No watchdog support in the kernel!"
+ exit 5
+ fi
+ loadproc $PROGRAM $ARGS
+}
+
+stop()
+{
+ echo "Stopping watchdog..."
+ if [ -e /var/run/watchdog.pid ]; then
+ kill $(cat /var/run/watchdog.pid)
+ else
+ /bin/false
+ fi
+ evaluate_retval
+}
diff --git a/scripts/watchdog/watchdog.conf b/scripts/watchdog/watchdog.conf
new file mode 100644
index 0000000..bda9331
--- /dev/null
+++ b/scripts/watchdog/watchdog.conf
@@ -0,0 +1,3 @@
+# the commandline options for watchdog, remove -q to make it really do its
work
+# (-q means "simulating only")
+WD_OPTS="-q -v"
diff --git a/scripts/wdm/wdm b/scripts/wdm/wdm
new file mode 100755
index 0000000..621abf7
--- /dev/null
+++ b/scripts/wdm/wdm
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/wdm
+RUNLEVEL=5
+PROVIDES=display_manager
+
+. /etc/init.d/smgl_init
+
+# overrides default start function, ensuring
+# that wdm releases control back to init system.
+start() {
+ echo "Starting wdm..."
+ if [ -e /usr/bin/wdm ]; then
+ /usr/bin/wdm -config /etc/wdm/wdm-config &
+ else
+ print_status failure
+ exit 1
+ fi
+}
diff --git a/scripts/webcleaner/webcleaner b/scripts/webcleaner/webcleaner
new file mode 100755
index 0000000..75e1847
--- /dev/null
+++ b/scripts/webcleaner/webcleaner
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# Startup/shutdown script for webcleaner
+#
+#
+# Start or stop webcleaner based upon the first argument to the script.
+#
+
+source /etc/init.d/smgl_functions
+
+PROGRAM=/usr/bin/webcleaner
+#ARGS="/etc/webcleaner/config"
+RUNLEVEL=3
+NEEDS="+network"
+
+#. /etc/init.d/smgl_init
+
+
+case $1 in
+ start)
+ echo "Starting webcleaner"
+ loadproc $PROGRAM &
+ evaluate_retval
+ echo " "
+ ;;
+
+ stop)
+ echo "Stopping webcleaner"
+## killproc $PROGRAM
+ pkill -f $PROGRAM
+ evaluate_retval
+ echo " "
+ ;;
+
+ restart|reload)
+ echo "Restarting webcleaner"
+ $0 stop
+ $0 start
+ evaluate_retval
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+# end of procfile startup script
diff --git a/scripts/webmin/webmin b/scripts/webmin/webmin
new file mode 100755
index 0000000..72c8115
--- /dev/null
+++ b/scripts/webmin/webmin
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+PROGRAM=/usr/share/webmin/miniserv.pl
+CONF=/etc/webmin/miniserv.conf
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting webmin..."
+ ${PROGRAM} ${CONF}
+ evaluate_retval
+}
+
+stop()
+{
+ killproc miniserv.pl
+}
+
+status()
+{
+ statusproc miniserv.pl
+}
+
+restart()
+{
+ stop &&
+ sleep 1 &&
+ start
+}
diff --git a/scripts/wifi-radar/wifi-radar b/scripts/wifi-radar/wifi-radar
new file mode 100755
index 0000000..e74f7e3
--- /dev/null
+++ b/scripts/wifi-radar/wifi-radar
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PROGRAM=/usr/sbin/wifi-radar
+PROGRAM_FLAGS="--daemon"
+RUNLEVEL=3
+PROVIDES=network
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo -n "Starting wifi-radar..."
+ $PROGRAM $PROGRAM_FLAGS &> /dev/null
+ echo
+ evaluate_retval
+}
+
+restart() {
+ run_func start
+}
diff --git a/scripts/wine/wine b/scripts/wine/wine
new file mode 100644
index 0000000..9e3dad1
--- /dev/null
+++ b/scripts/wine/wine
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/wine
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ echo "Starting WINE..." &&
+ if [ -e /proc/sys/fs/binfmt_misc/CLR ]; then
+ echo ".Net and Windows executables have the same magic number" &&
+ echo "so they cannot both be set for binfmt_misc." &&
+ echo "WINE not loaded." &&
+ return 1
+ fi &&
+
+ # From /usr/src/linux/Documentation/binfmt_misc.txt
+ # Insert BINFMT_MISC module into the kernel if it's not loaded
+ if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then
+ /sbin/modprobe binfmt_misc
+ mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
+ fi &&
+
+ # Register support for .Net CLR binaries
+ if [ -e /proc/sys/fs/binfmt_misc/register ]; then
+ builtin echo ':DOSWin:M::MZ::/usr/bin/wine:' \
+ > /proc/sys/fs/binfmt_misc/register
+ else
+ echo "No binfmt_misc support" &&
+ return 1
+ fi
+}
+
+stop()
+{
+ echo "Stopping WINE..." &&
+ if [ -e /proc/sys/fs/binfmt_misc/DOSWin ]; then
+ # Send both 0 and -1 in case removing doesn't disable...
+ # Disable wine
+ builtin echo '0' > /proc/sys/fs/binfmt_misc/DOSWin &&
+ # Remove wine
+ builtin echo '-1' > /proc/sys/fs/binfmt_misc/DOSWin
+ fi
+}
+
+restart()
+{
+ echo "Restarting WINE..." &&
+ stop &&
+ start
+}
diff --git a/scripts/wmacpimon/wmacpimond b/scripts/wmacpimon/wmacpimond
new file mode 100755
index 0000000..9554f4a
--- /dev/null
+++ b/scripts/wmacpimon/wmacpimond
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM="/usr/sbin/wmacpimond"
+ARGS="/etc/wmacpimon.prc"
+RUNLEVEL=S
+NEEDS="+local_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/wondershaper/wshaper b/scripts/wondershaper/wshaper
new file mode 100755
index 0000000..3bb1a2b
--- /dev/null
+++ b/scripts/wondershaper/wshaper
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/wshaper
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo "Starting Wonder Shaper..."
+ ${PROGRAM} start &&
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping Wonder Shaper..."
+ ${PROGRAM} stop &&
+ evaluate_retval
+}
+
+restart() {
+ stop &&
+ sleep 1 &&
+ start
+}
+
+status() {
+ ${PROGRAM} status
+}
diff --git a/scripts/wpa_supplicant/wpa_supplicant
b/scripts/wpa_supplicant/wpa_supplicant
new file mode 100755
index 0000000..1012147
--- /dev/null
+++ b/scripts/wpa_supplicant/wpa_supplicant
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+. /etc/sysconfig/wpa_supplicant
+
+PROGRAM=/usr/sbin/wpa_supplicant
+RUNLEVEL=3
+NEEDS="+network"
+
+CLI=/usr/sbin/wpa_cli
+DROPFILE=/var/tmp/wpa_supplicant.drop
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ required_executable /usr/sbin/iwconfig
+ local IWCONFIG=`builtin echo $(/usr/sbin/iwconfig $INTERFACE 2>&1)`
+
+ if [[ "$IWCONFIG" == $INTERFACE\ *Access\ Point:\ Not-Associated* ||
+ "$IWCONFIG" == $INTERFACE\ *ESSID:off/any* ||
+ "$IWCONFIG" == $INTERFACE\ *ESSID:\"\"* ]]; then
+ echo Starting wpa_supplicant...
+ $PROGRAM -B -i $INTERFACE -D $DRIVER -c $CONFIG -g $CONTROL > /dev/null
>&1
+ evaluate_retval
+ echo "INTERFACE=\"$INTERFACE\"" > $DROPFILE
+ elif [[ "$IWCONFIG" == $INTERFACE\ radio\ off* ]]; then
+ echo $INTERFACE: radio off
+ (exit 1)
+ evaluate_retval
+ elif [[ "$IWCONFIG" == $INTERFACE\ no\ wireless* ]]; then
+ echo $INTERFACE: no wireless extensions
+ (exit 1)
+ evaluate_retval
+ elif [[ "$IWCONFIG" == $INTERFACE\ No\ such* ]]; then
+ echo $INTERFACE: no such device
+ (exit 1)
+ evaluate_retval
+ else
+ echo $INTERFACE: already connected
+ (exit 1)
+ evaluate_retval
+ fi
+}
+
+stop()
+{
+ required_executable $CLI
+
+ [[ -f $DROPFILE ]] && . $DROPFILE && rm $DROPFILE
+ echo Stopping wpa_supplicant...
+ $CLI -i $INTERFACE terminate 1 > /dev/null 2>&1
+ evaluate_retval
+}
+
+status()
+{
+ required_executable $CLI
+ $CLI status
+}
diff --git a/scripts/wpa_supplicant/wpa_supplicant.conf
b/scripts/wpa_supplicant/wpa_supplicant.conf
new file mode 100644
index 0000000..8ffd3e1
--- /dev/null
+++ b/scripts/wpa_supplicant/wpa_supplicant.conf
@@ -0,0 +1,15 @@
+#
+# wpa_supplicant init script config for Source Mage GNU/Linux.
+#
+
+# Network interface name
+INTERFACE=eth1
+
+# Device driver
+DRIVER=wext
+
+# Config file
+CONFIG=/etc/wpa_supplicant.conf
+
+# Global control interface socket
+CONTROL=/var/run/wpa_supplicant-global
diff --git a/scripts/wwwoffle/wwwoffled b/scripts/wwwoffle/wwwoffled
new file mode 100644
index 0000000..173e848
--- /dev/null
+++ b/scripts/wwwoffle/wwwoffled
@@ -0,0 +1,92 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/wwwoffled
+NEEDS="+network"
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+FUNCS="$FUNCS autodial online offline fetch config dump purge"
+
+required_executable /usr/bin/wwwoffle
+
+stop()
+{
+
+ echo "Stopping $NAME..."
+ wwwoffle -kill
+ evaluate_retval
+
+}
+
+autodial()
+{
+
+ echo "Setting $NAME in autodial mode..."
+ wwwoffle -autodial
+ evaluate_retval
+
+}
+
+online()
+{
+
+ echo "Setting $NAME online..."
+ wwwoffle -online
+ evaluate_retval
+
+}
+
+offline()
+{
+
+ echo "Setting $NAME offline..."
+ wwwoffle -offline
+ evaluate_retval
+
+}
+
+fetch()
+{
+
+ echo "Fetching..."
+ wwwoffle -fetch
+ evaluate_retval
+
+}
+
+config()
+{
+
+ echo "Telling $NAME to re-read configuration file..."
+ wwwoffle -config
+ evaluate_retval
+
+}
+
+dump()
+{
+
+ echo "Telling $NAME to dump out configuration file..."
+ wwwoffle -dump
+ evaluate_retval
+
+}
+
+purge()
+{
+
+ echo "Purging..."
+ wwwoffle -purge
+ evaluate_retval
+
+}
+
+status()
+{
+
+ statusproc $PROGRAM
+ wwwoffle -status
+ evaluate_retval
+
+}
diff --git a/scripts/xdm/xdm b/scripts/xdm/xdm
new file mode 100755
index 0000000..4f9aca6
--- /dev/null
+++ b/scripts/xdm/xdm
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/xdm
+RUNLEVEL=5
+PROVIDES=display_manager
+
+. /etc/init.d/smgl_init
diff --git a/scripts/xen-tools/xend b/scripts/xen-tools/xend
new file mode 100755
index 0000000..318160d
--- /dev/null
+++ b/scripts/xen-tools/xend
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+local_fs +network"
+PROVIDES="xend"
+RECOMMENDED=yes
+
+. /etc/init.d/smgl_init
+. /etc/init.d/smgl_functions
+
+await_daemons_up()
+{
+ i=1
+ rets=10
+ xend status
+ while [ $? -ne 0 -a $i -lt $rets ]
+ do
+ sleep 1
+ i=$(($i + 1))
+ xend status
+ done
+}
+
+start()
+{
+ xend start
+ await_daemons_up
+}
+
+stop()
+{
+ xend stop
+}
+
+status()
+{
+ xend status
+}
+
+reload()
+{
+ xend reload
+}
+
+restart()
+{
+ xend restart
+ await_daemons_up
+}
+
+force-reload()
+{
+ restart
+}
+
diff --git a/scripts/xinetd/xinetd b/scripts/xinetd/xinetd
new file mode 100755
index 0000000..53fe5d5
--- /dev/null
+++ b/scripts/xinetd/xinetd
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/xinetd
+ARGS="-reuse"
+RUNLEVEL=3
+NEEDS="+remote_fs"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/xshttpd/xshttpd b/scripts/xshttpd/xshttpd
new file mode 100644
index 0000000..fb5f570
--- /dev/null
+++ b/scripts/xshttpd/xshttpd
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+. /etc/sysconfig/xshttpd
+
+PIDFILE=${PIDFILE:-/var/run/httpd.pid}
+PROGRAM=${PROGRAM:-/usr/bin/httpd}
+CONTROLPROGRAM=${CONTROLPROGRAM:-/usr/bin/httpdc}
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+restart() {
+ if [[ -f $PIDFILE ]]; then
+ $CONTROLPROGRAM restart
+ evaluate_retval
+ else
+ run_func start
+ fi
+}
+
+stop() {
+ $CONTROLPROGRAM stop
+ evaluate_retval
+}
+
+status() {
+ $CONTROLPROGRAM status
+}
+
+reload() {
+ run_func restart
+}
diff --git a/scripts/xshttpd/xshttpd.conf b/scripts/xshttpd/xshttpd.conf
new file mode 100644
index 0000000..3bd2485
--- /dev/null
+++ b/scripts/xshttpd/xshttpd.conf
@@ -0,0 +1,6 @@
+#Depending on whether you chose to install xshttpd with a binary prefix or
not
+#you need to replace the {foobar} below with xshttpd or httpd respectively.
+PIDFILE=/var/run/{foobar}.pid
+PROGRAM=/usr/bin/{foobar}
+CONTROLPROGRAM=/usr/bin/{foobar}c
+ARGS=
diff --git a/scripts/yaws/yaws b/scripts/yaws/yaws
new file mode 100755
index 0000000..0ebd991
--- /dev/null
+++ b/scripts/yaws/yaws
@@ -0,0 +1,84 @@
+#!/bin/bash
+#
+# Startup script for the Yaws Web Server
+#
+# config: /etc/yaws.conf
+#
+# chkconfig: 2345 65 35
+# description: yaws - Erlang enabled http server
+# use "/sbin/chkconfig --add yaws" to install
+
+# Modified from supplied version in YAWS tarball
+
+RUNLEVEL=3
+PROGRAM=/usr/bin/yaws
+NEEDS="+network +remote_fs"
+
+. /etc/init.d/smgl_init
+
+prog=yaws
+
+start() {
+ echo -n $"Starting $prog: "
+ $PROGRAM -D -heart
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/yaws
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ str=`$PROGRAM -s`
+ if [ "$str" = "stopping" ]; then
+ RETVAL=0
+ else
+ RETVAL=1
+ fi
+ rm -f /var/lock/subsys/yaws /var/run/yaws.pid
+ return $RETVAL
+}
+
+
+reload() {
+ echo -n $"Reloading $prog: "
+ r=`$PROGRAM -h`
+ RETVAL=$?
+ echo $r
+ return $RETVAL
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ $PROGRAM -S
+ RETVAL=$?
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /tmp/yaws.ctl ] ; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ reload
+ ;;
+ help)
+ $yaws -?
+ ;;
+ *)
+ echo $"Usage: $prog
{start|stop|restart|condrestart|reload|status|fullstatus|help}"
+ exit 1
+esac
+
+exit $RETVAL
diff --git a/scripts/ypbind-mt/ypbind b/scripts/ypbind-mt/ypbind
new file mode 100644
index 0000000..d56eb02
--- /dev/null
+++ b/scripts/ypbind-mt/ypbind
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/ypbind
+RUNLEVEL=3
+NEEDS="+remote_fs +network +portmap"
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ /bin/nisdomainname `cat /etc/nisdomainname` &&
+ _start
+}
diff --git a/scripts/ypserv/yppasswdd b/scripts/ypserv/yppasswdd
new file mode 100644
index 0000000..291eb4a
--- /dev/null
+++ b/scripts/ypserv/yppasswdd
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/rpc.yppasswdd
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/ypserv/ypserv b/scripts/ypserv/ypserv
new file mode 100644
index 0000000..a8a7547
--- /dev/null
+++ b/scripts/ypserv/ypserv
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/ypserv
+RUNLEVEL=3
+NEEDS="+remote_fs +network"
+
+. /etc/init.d/smgl_init
diff --git a/scripts/zaptel/zaptel b/scripts/zaptel/zaptel
new file mode 100644
index 0000000..fcc601b
--- /dev/null
+++ b/scripts/zaptel/zaptel
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+. /etc/sysconfig/zaptel
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+
+. /etc/init.d/smgl_init
+
+required_executable /sbin/ztcfg
+required_executable /sbin/modprobe
+
+start()
+{
+ echo "Loading zaptel"
+ modprobe zaptel >& /dev/null
+ evaluate_retval
+
+ echo "Loading zaptel hardware modules"
+ for x in ${MODULES}; do
+ if modprobe ${x} >& /dev/null; then
+ echo -n " ${x}"
+ fi
+ done
+
+ echo
+ echo "Running ztcfg"
+ /sbin/ztcfg >& /dev/null
+ evaluate_retval
+
+ RVAL=$?
+ [ ${RVAL} -eq 0 ] && touch /var/lock/subsys/zaptel
+ }
+
+stop()
+{
+ echo "Unloading zaptel hardware drivers"
+ for x in ${MODULES}; do
+ if rmmod ${x} >& /dev/null; then
+ echo -n " ${x}"
+ fi
+ done
+
+ echo
+ echo "Removing zaptel module"
+ rmmod zaptel >& /dev/null
+ evaluate_retval
+
+ RVAL=$?
+ [ ${RVAL} -eq 0 ] && rm -f /var/lock/subsys/zaptel
+}
+
+restart()
+{
+ run_func stop
+ run_func start
+}
+
+reload()
+{
+ echo "Reloading ztcfg"
+ /sbin/ztcfg >& /dev/null
+ evaluate_retval
+}
+
+
+status()
+{
+ if [[ -f /var/lock/subsys/zaptel ]]; then
+ echo "Zaptel driver loaded"
+ else
+ echo "Zaptel driver not loaded"
+ fi
+}
+
+
+usage()
+{
+ echo "$0 {start|stop|restart|status|reload}"
+}
diff --git a/scripts/zope/zope b/scripts/zope/zope
new file mode 100755
index 0000000..87c1839
--- /dev/null
+++ b/scripts/zope/zope
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+# the scripts for zope and zope3 are almost identical
+ZOPE=zope
+INSTANCE=/var/$ZOPE
+if [ ! -d $INSTANCE ];then
+ echo $ZOPE instance $INSTANCE not available. please create one
+ echo by running /usr/lib/$ZOPE/bin/mkzopeinstance -d $INSTANCE
+ exit 1
+fi
+
+PROGRAM=$INSTANCE/bin/zopectl
+ARGS="$1"
+
+. /etc/init.d/smgl_init
+
+stop()
+{
+ echo "Stopping $ZOPE..."
+ $PROGRAM stop
+ evaluate_retval
+}
+
+status()
+{
+ echo "Status $ZOPE..."
+ $PROGRAM status
+ evaluate_retval
+}
+
diff --git a/scripts/zope3/zope3 b/scripts/zope3/zope3
new file mode 100755
index 0000000..1a246bd
--- /dev/null
+++ b/scripts/zope3/zope3
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+RUNLEVEL=3
+NEEDS="+network +remote_fs"
+
+# the scripts for zope and zope3 are almost identical
+
+ZOPE=zope3
+INSTANCE=/var/$ZOPE
+if [ ! -d $INSTANCE ];then
+ echo $ZOPE instance $INSTANCE not available. please create one
+ echo by running /usr/lib/$ZOPE/bin/mkzopeinstance -d $INSTANCE
+ exit 1
+fi
+
+PROGRAM=$INSTANCE/bin/zopectl
+ARGS="$1"
+
+. /etc/init.d/smgl_init
+
+stop()
+{
+ echo "Stopping $ZOPE..."
+ $PROGRAM stop
+ evaluate_retval
+}
+
+status()
+{
+ echo "Status $ZOPE..."
+ $PROGRAM status
+ evaluate_retval
+}
+
diff --git a/simpleinit.def b/simpleinit.def
new file mode 100644
index 0000000..661b180
--- /dev/null
+++ b/simpleinit.def
@@ -0,0 +1,15 @@
+# where init looks for it's relevant things
+INITROOT="/etc/init.d"
+
+# in case this isn't the same as INITROOT
+RUNLEVELROOT="${INITROOT}/runlevels"
+
+# only those that have installable scripts
+RUNLEVELS=('%DEV' '%S' '%1' '%2' '%3' '%4' '%5')
+
+# where scripts are sorted in a $SPELL/script way
+SCRIPTROOT="/lib/imp/scripts/simpleinit"
+
+# where the various libs are stored
+MODULEROOT="/lib/imp/modules/simpleinit"
+
diff --git a/version b/version
new file mode 100644
index 0000000..77d6f4c
--- /dev/null
+++ b/version
@@ -0,0 +1 @@
+0.0.0



  • [SM-Commit] GIT changes to master imp-data-simpleinit by Arjan Bouter (6c0f25b6ccfdc042de7edc42b2aabe1980044b01), Arjan Bouter, 05/23/2011

Archive powered by MHonArc 2.6.24.

Top of Page