V961 Tree Umbau

git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_upstartaddon@4330 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2008-05-03 16:59:19 +00:00
commit 2cfe1de66a
25 changed files with 595 additions and 0 deletions

19
etc/event.d/autofs Normal file
View File

@ -0,0 +1,19 @@
start on started mountfs
stop on stopping mountfs
console output
pre-start script
source /etc/init.d/functions
if grep automount /etc/nsswitch.conf 2>/dev/null|\
grep files &>/dev/null; then
if [ -f /etc/sysconfig/auto.master ]; then
cat /etc/sysconfig/auto.master|initautomount files file >>/tmp/autofs.log
fi
fi
end script
post-stop script
kill `ps -ef|grep automount|grep file|awk '{print $2}'`
end script

17
etc/event.d/autofs-nis Normal file
View File

@ -0,0 +1,17 @@
start on started ypclient
stop on stopping ypclient
console output
pre-start script
source /etc/init.d/functions
if grep automount /etc/nsswitch.conf 2>/dev/null|\
grep nis &>/dev/null; then
ypcat -k auto.master|initautomount nis yp >>/tmp/autofs.log
fi
end script
post-stop script
kill `ps -ef|grep automount|grep yp|awk '{print $2}'`
end script

47
etc/event.d/binfmt_misc Normal file
View File

@ -0,0 +1,47 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started mountfs
console logged
script
source /etc/init.d/functions
if modprobe binfmt_misc; then
if ! mount|grep binfmt_misc >/dev/null 2>&1; then
echo -n "Mounting binfmt_misc filesystem"
mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
evaluate_retval
fi
if [ -f /opt/wine/bin/wine ] && [ ! -f /proc/sys/fs/binfmt_misc/mswin ]; then
echo -n "Setting up binfmt_misc for windows executables"
echo ":mswin:M:0:\\x4d\\x5a\\x90\\x00::/opt/wine/bin/wine:" >/proc/sys/fs/binfmt_misc/register
evaluate_retval
fi
if [ -f /usr/lib64/jdk/bin/java ]; then
JAVAPATH=/usr/lib64/jdk/bin
elif [ -f /usr/lib/jdk/bin/java ]; then
JAVAPATH=/usr/lib/jdk/bin
fi
if [ "$JAVAPATH" ]; then
if [ ! -f /proc/sys/fs/binfmt_misc/Java ]; then
echo -n "Setting up binfmt_misc for java executables"
echo ":Java:M::\\xca\\xfe\\xba\\xbe::$JAVAPATH/javawrapper:" >/proc/sys/fs/binfmt_misc/register
evaluate_retval
fi
if [ ! -f /proc/sys/fs/binfmt_misc/ExecutableJAR ]; then
echo -n "Setting up binfmt_misc for jar executables"
echo ":ExecutableJAR:E::jar::$JAVAPATH/jarwrapper:">/proc/sys/fs/binfmt_misc/register
evaluate_retval
fi
if [ ! -f /proc/sys/fs/binfmt_misc/Applet ]; then
echo -n "Setting up binfmt_misc for java applets"
echo ":Applet:M::<!--applet::$JAVAPATH/appletviewer:" >/proc/sys/fs/binfmt_misc/register
evaluate_retval
fi
fi
fi
end script

13
etc/event.d/cpufreqd Normal file
View File

@ -0,0 +1,13 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started mountfs
stop on stopping mountfs
console logged
exec /usr/sbin/cpufreqd -D
#exec /usr/sbin/cpufreqd
respawn

12
etc/event.d/cron Normal file
View File

@ -0,0 +1,12 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started syslogd
stop on stopping syslogd
console logged
exec /usr/sbin/fcron -f
respawn

40
etc/event.d/cups Normal file
View File

@ -0,0 +1,40 @@
#!/bin/sh
#<Scriptname> des systemvinit prozesses
#Script Framework - Automatisiertes Erzeugen der Monsum Linux Distribution
#(c) Rainmaker MultiMedia OHG
#
#$Author: kueller $
#$Date: 2003/04/19 08:08:07 $
#$Revision: 1.5 $
#
#$Log: cups,v $
#Revision 1.5 2003/04/19 08:08:07 kueller
#Nicht Funktionierende Optionen status und reload entfernt
#
#Revision 1.4 2003/01/06 18:02:09 kueller
#Lage des sleep kommandos hat sich geändert - script angepasst
#
#Revision 1.3 2002/01/11 15:43:31 kueller
#Pfade fuer aufruf von cups korrigiert
#
#Revision 1.2 2001/09/24 13:01:33 kueller
#Meldung welcher Dienst betroffen ist korriegiert -
#Die Meldung "Starting ...." ist ungenügend - erscheint jetzt als
#"Starting cupsd"
#
#Revision 1.1.1.1 2001/09/23 00:15:48 kueller
#Neustart wg. Datenverlust
#
#Revision 1.1.1.1 2001/09/07 12:15:54 dhofmann
#Cups Addon
#
#Revision 1.1.1.1 2001/08/08 10:02:32 kueller
#sysvinit addons
#
#
start on stopped routing
stop on stopping mountfs
exec /usr/sbin/cupsd -f
respawn

44
etc/event.d/dbus Normal file
View File

@ -0,0 +1,44 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on stopped routing
stop on stopping ifup
#stop on runlevel
description "use rc file to start dbus-daemon"
author "Harald Kueller <harald.kueller@compuextreme.de>"
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
pre-start script
if [ -f /var/run/dbus/pid ]; then
if [ "`pgrep dbus-daemon`" -eq "`cat /var/run/dbus/pid`" ]; then
echo "The dbus deamon is already running with pid `cat /var/run/dbus/pid`"
exit 10
else
find /var/run/dbus -type f -exec rm {} \;
fi
fi
export PATH=$PATH:/usr/X11R7/bin
/usr/X11R7/bin/dbus-launch --config-file /etc/sysconfig/dbus/dbus-1/system.conf >/tmp/dbus_startup 2>>/tmp/dbus.debug
source /tmp/dbus_startup
rm /tmp/dbus_startup
echo $DBUS_SESSION_BUS_PID >/var/run/dbus/pid
echo "DBUS_SESSION_BUS_ADDRESS='$DBUS_SESSION_BUS_ADDRESS'" \
>/var/run/dbus/address
end script
post-stop script
if [ ! -f /var/run/dbus/pid ]; then
echo "dbus is not running!"
exit 10
fi
kill `cat /var/run/dbus/pid`
rm /var/run/dbus/pid
rm /var/run/dbus/address
end script

11
etc/event.d/famd Normal file
View File

@ -0,0 +1,11 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started syslogd
stop on stopping syslogd
console logged
exec /usr/sbin/famd -f
respawn

65
etc/event.d/hald Normal file
View File

@ -0,0 +1,65 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source: /export/Data/cvs/Viitor_hald/etc/init.d/hald,v $
#
#(c) 2003 Harald Kueller, Germany
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#InitScript zum Start des Daemons:
#
#Letzte Änderung von: $Author: kueller $
#Datum der letzten Änderung: $Date: 2007/04/13 13:15:19 $
#Version der Datei: $Revision: 1.1.1.1 $
#
#$Log: hald,v $
#Revision 1.1.1.1 2007/04/13 13:15:19 kueller
#new initialisazion for hal
#
#
start on started dbus
stop on stopping dbus
pre-start script
source /etc/init.d/functions
if [ -f /var/run/hald.pid ]; then
if [ "`pgrep -P 1 hald`" == "`cat /var/run/hald.pid`" ]; then
echo -n "Hald already running"
print_status failure
exit 1
else
rm /var/run/hald.pid
fi
fi
end script
exec /usr/sbin/hald --daemon=no --use-syslog
respawn
post-stop script
source /etc/init.d/functions
if [ ! -f /var/run/hald.pid ]; then
echo -n "hald not running"
print_status failure
exit 10
fi
echo -n "Stopping Hardware Abstraction Layer Daemon"
kill `cat /var/run/hald.pid`
rm /var/run/hald.pid
evaluate_retval
end script

12
etc/event.d/hcid Normal file
View File

@ -0,0 +1,12 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started dbus
stop on stopping dbus
console logged
exec /usr/sbin/hcid -n -s -f /etc/sysconfig/bluetooth/hcid.conf
respawn

12
etc/event.d/hidd Normal file
View File

@ -0,0 +1,12 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started hcid
stop on stopping hcid
console logged
exec /usr/bin/hidd -n --server
respawn

44
etc/event.d/midentd Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source: /export/Data/cvs/Viitor_midentd/etc/init.d/midentd,v $
#
#(c) 2003 Harald Kueller, Germany
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#InitScript zum Start des Daemons:
#
#Letzte Änderung von: $Author: segler $
#Datum der letzten Änderung: $Date: 2006/03/27 09:59:07 $
#Version der Datei: $Revision: 1.1.1.1 $
#
#$Log: midentd,v $
#Revision 1.1.1.1 2006/03/27 09:59:07 segler
#midentd environment
#
#
start on stopped routing
stop on stopping ifup
pre-start script
/usr/sbin/midentd -u nobody
end script
post-stop script
pkill midentd
end script

49
etc/event.d/nfs-server Normal file
View File

@ -0,0 +1,49 @@
#!/bin/sh
#Start/Stop SystemV Script für nfsd
#(c) Rainmaker MultiMedia OHG
#
#$Author: kueller $
#$Date: 2007/02/10 20:39:30 $
#$Revision: 1.4 $
#
#$Log: nfs.server,v $
#Revision 1.4 2007/02/10 20:39:30 kueller
#aus kexportfs ist nun exportfs geworden. script angepasst
#
#Revision 1.3 2003/04/19 07:51:53 kueller
#Nicht funktionsfähige status option entfernt
#
#Revision 1.2 2002/02/07 11:26:24 hkueller
#Server Deamon wird mit 8 Threads gestartet - lt. Docu bessere Performance
#Mountd wird nun mit nfs Version 3 gestartet
#
#Revision 1.1.1.1 2001/09/23 00:27:56 kueller
#Neustart wg. Datenverlust
#
#Revision 1.1 2001/09/09 16:18:30 cvs
#
#/etc/init.d/nfsd in /etc/init.d/nfs.server umbenannt (probleme bei kill auf
#nfsd - schiesst das eigene script mit ab..:-(( )
#
#Revision 1.1.1.1 2001/09/09 16:06:04 kueller
#NFS Server AddOns
#
#
start on started rpc
stop on stopping rpc
pre-start script
source /etc/init.d/functions
/usr/sbin/exportfs -r
/usr/sbin/rpc.krquotad
/usr/sbin/rpc.knfsd 8
/usr/sbin/rpc.kmountd --nfs-version 3
end script
post-stop script
pkill rpc.kmountd
pkill nfsd
pkill rpc.krquotad
/usr/sbin/exportfs -au
end script

11
etc/event.d/nfsclient Normal file
View File

@ -0,0 +1,11 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started rpc
stop on stopping rpc
console logged
exec /usr/sbin/rpc.kstatd -F

10
etc/event.d/pcmciautils Normal file
View File

@ -0,0 +1,10 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started udev
console logged
exec /sbin/pcmcia-socket-startup

12
etc/event.d/rfcomm Normal file
View File

@ -0,0 +1,12 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started hcid
stop on stopped hcid
console logged
exec /usr/bin/rfcomm -f /etc/sysconfig/bluetooth/rfcomm.conf bind all

26
etc/event.d/routed Normal file
View File

@ -0,0 +1,26 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on stopped routing
stop on stopping ifup
console logged
script
source /etc/init.d/functions
if [ ! -f /usr/sbin/routed ]; then
exit 0
fi
if [ ! -f /etc/sysconfig/net/notrouter ]; then
NUMIF=`ip -f inet addr show|grep inet|wc -l`
if [ $NUMIF -gt 2 ]; then
ROUTEOPTIONS="-s -g"
fi
else
ROUTEOPTIONS="-q"
fi
/usr/sbin/routed -d $ROUTEOPTIONS
end script

11
etc/event.d/rpc Normal file
View File

@ -0,0 +1,11 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started ifup
stop on stopping ifup
console logged
exec /usr/sbin/portmap -f

12
etc/event.d/sendmail Normal file
View File

@ -0,0 +1,12 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on mailstart
stop on mailstop
console logged
exec /usr/sbin/sendmail -bD -q30m -om
respawn

View File

@ -0,0 +1,19 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started syslogd
stop on stopping syslogd
console logged
pre-start script
if [ -f /etc/mail/sendmail.cf ]; then
initctl emit mailstart &
fi
end script
post-stop script
initctl emit mailstop
end script

21
etc/event.d/sshd Normal file
View File

@ -0,0 +1,21 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started syslogd
stop on stopping syslogd
console output
pre-start script
if [ ! -f /etc/sysconfig/ssh/ssh_host_key ]; then
ssh-keygen -N "" -t rsa1 -f /etc/sysconfig/ssh/ssh_host_key
ssh-keygen -N "" -t rsa -f /etc/sysconfig/ssh/ssh_host_rsa_key
ssh-keygen -N "" -t dsa -f /etc/sysconfig/ssh/ssh_host_dsa_key
chmod 0600 /etc/sysconfig/ssh/*key*
fi
end script
exec /usr/sbin/sshd -D
respawn

10
etc/event.d/sysctl Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
start on started mountfs
script
if [ ! -f /etc/sysconfig/sysctl.conf ];then
touch /etc/sysconfig/sysctl.conf
fi
/sbin/sysctl -q -e -p /etc/sysconfig/sysctl.conf
end script

4
etc/event.d/xdm Normal file
View File

@ -0,0 +1,4 @@
start on started rpc
stop on stopped rpc
exec `cat /etc/X11/xdm/*.xdm`

11
etc/event.d/xinetd Normal file
View File

@ -0,0 +1,11 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started rpc
stop on stopping rpc
console logged
exec /usr/sbin/xinetd -filelog /var/log/xinetd.log -dontfork

63
tmp/postinstall Executable file
View File

@ -0,0 +1,63 @@
cd /etc/init.d
for i in 0 1 2 3 4 5 6; do
cd rc$i.d
if [ ! -d upstart_disabled ]; then
mkdir upstart_disabled
fi
if [ -h S06binfmt_misc ]; then
mv S06binfmt_misc upstart_disabled/S06binfmt_misc
fi
if [ -h S07cron ]; then
mv S07cron upstart_disabled/S07cron
fi
if [ -h S08cpufreqd ]; then
mv S08cpufreqd upstart_disabled/S08cpufreqd
fi
if [ -h S08pcmciautils ]; then
mv S08pcmciautils upstart_disabled/S08pcmciautils
fi
if [ -h S11fam ]; then
mv S11fam upstart_disabled/S11fam
fi
if [ -h S11rpc ]; then
mv S11rpc upstart_disabled/S11rpc
fi
if [ -h S12dbus ]; then
mv S12dbus upstart_disabled/S12dbus
fi
if [ -h S12xinetd ]; then
mv S12xinetd upstart_disabled/S12xinetd
fi
if [ -h S13bluetooth ]; then
mv S13bluetooth upstart_disabled/S13bluetooth
fi
if [ -h S14autofs ]; then
mv S14autofs upstart_disabled/S14autofs
fi
if [ -h S14hald ]; then
mv S14hald upstart_disabled/S14hald
fi
if [ -h S14midentd ]; then
mv S14midentd upstart_disabled/S14midentd
fi
if [ -h S14sysctl ]; then
mv S14sysctl upstart_disabled/S14sysctl
fi
if [ -h S15sshd ]; then
mv S15sshd upstart_disabled/S15sshd
fi
if [ -h S20smtp ]; then
mv S20smtp upstart_disabled/S20smtp
fi
if [ -h S60cups ]; then
mv S60cups upstart_disabled/S60cups
fi
if [ -h S60nfs.server ]; then
mv S60nfs.server upstart_disabled/S60nfs.server
fi
if [ -h S99xdm ]; then
mv S99xdm upstart_disabled/S99xdm
fi
cd ..
done