Compare commits

...

10 Commits

Author SHA1 Message Date
kueller
4dad666f7a Umgebung für root wird nicht korrekt gesetzt. Daher alle Befehle in sbin mit
absolutem pfad versehen.
ein Read ausserhalb der schleife auf ein File führt zu Fehleren, und 
bringt upstart dazu das Script abzubrechen. Hierdurch wurde das routing bei vorhandensein der gateway Datei nicht korrekt eingestellt und kein forwarding mehr aktiviert. -> korrigiert



git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5888 504e572c-2e33-0410-9681-be2bf7408885
2010-12-03 07:11:42 +00:00
kueller
7267db70ce Startup für nscd hinzugefügt
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5885 504e572c-2e33-0410-9681-be2bf7408885
2010-12-01 10:21:29 +00:00
kueller
67cf088fe9 er überbleibsel beseitigtM dbus.conf
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5881 504e572c-2e33-0410-9681-be2bf7408885
2010-11-29 09:02:19 +00:00
kueller
0f214ed5f8 /var/run/dbus/system-dbus-socket wird jetzt aufgeraeumt.
aus post-start wurde korrekter weise pre-start



git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5876 504e572c-2e33-0410-9681-be2bf7408885
2010-11-22 06:53:21 +00:00
kueller
934abdb477 mountfs:
Ein loeschen der utmp Datei beim Hochfahren hinzugefügt. Damit sollten die Fragen nach noch offenen
Sessions beim logout im KDE beendet sein
udev:
/dev/console und /dev/null wird auf vorhandensein geprüft vor dem anlegen..



git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5872 504e572c-2e33-0410-9681-be2bf7408885
2010-11-21 13:42:11 +00:00
kueller
8168820fa3 Ausführung der Mounts pro Ebene parallelisiert (nicht mehr mit mount -a)
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5835 504e572c-2e33-0410-9681-be2bf7408885
2010-10-11 07:15:55 +00:00
kueller
1838f1085b Das rechtzeitige Aufraeumen der /etc/mtab funktioniert jetzt wieder korrekt^
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5832 504e572c-2e33-0410-9681-be2bf7408885
2010-10-04 17:03:03 +00:00
kueller
27238aab6b Klammer fehler bei den start bedingungen
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5759 504e572c-2e33-0410-9681-be2bf7408885
2010-07-23 18:37:15 +00:00
kueller
d0c14b1334 Stop on S wird nicht korrekt erkannt - entfernt
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5716 504e572c-2e33-0410-9681-be2bf7408885
2010-06-23 10:05:20 +00:00
kueller
b40d9de0ff Bugfix -> klammer schliessen vergessen
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5695 504e572c-2e33-0410-9681-be2bf7408885
2010-06-01 17:32:35 +00:00
14 changed files with 69 additions and 35 deletions

View File

@ -10,6 +10,10 @@ console output
script
echo "Starting checkvar script"
source /etc/init/functions
mount -o remount,rw /
rm /etc/mtab
touch /etc/mtab
mount -o remount,ro /
mount -t proc none /proc
status_message "/proc mounted"
if mount|grep /dev/root|grep nfs &>/dev/null; then

View File

@ -4,12 +4,15 @@ version 1.0
emits none special
start on (runlevel [2345] and (started ifup))
stop on runlevel [S016]
stop on runlevel [016]
console output
post-start script
pre-start script
dbus-uuidgen --ensure
if [ -f /var/run/dbus/system_bus_socket ]; then
rm /var/run/dbus/system_bus_socket
fi
end script
script

View File

@ -3,7 +3,7 @@ author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on ( runlevel [12345] and ( started udev )
start on ( runlevel [12345] and ( started udev ))
pre-start script
echo "Loading additional modules"

View File

@ -10,25 +10,38 @@ script
source /etc/init/functions
/bin/mount -n -o remount,rw /
status_message "Remount of / to rw"
echo >/etc/mtab
/bin/mount -f -o remount,rw /
/bin/rm -f /fastboot /forcefsck
/sbin/swapon -a
status_message "Swap Aktivated"
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
DEVICE=`awk '{if( $2 == "'$MOUNTPOINT'") print $1}' /etc/fstab`
if [ ! "$FILESYSTEM" == "nfs" ] \
&& [ ! "$FILESYSTEM" == "swap" ] \
&& [ ! "$MOUNTPOINT" == "/" ] \
&& [ ! "$DEVICE" == "none" ]; then
if [ -d $MOUNTPOINT ]; then
mount $MOUNTPOINT
status_message "Mount of $MOUNTPOINT"
else
echo -n "Mountpoint $MOUNTPOINT not existing!"
POINTS=`sed -e "/^#/d" -e "/^$/d" /etc/fstab|\
awk '{if ( ( $2 != "/" ) && \
( $3 != "swap" ) && \
( $3 != "nfs" ) ) print $2 }'`
Do_Mount=1
FOUND=0
MP_DEPTH=1
while [ $Do_Mount -eq 1 ]; do
for i in $POINTS; do
DEPTH=`echo $i|awk -F"/" '{print NF-1}'`
if [ $DEPTH == $MP_DEPTH ]; then
if [ ! -d $i ]; then
mkdir -p $i
fi
mount $i &
status_message "Mount of $i"
FOUND=1
fi
done
wait `pgrep /bin/mount`
if [ $FOUND -eq 0 ]; then
Do_Mount=0
else
FOUND=0
(( MP_DEPTH++ ))
fi
fi
done
/sbin/ldconfig
if [ -f /var/run/utmp ]; then
cp /dev/null /var/run/utmp
fi
end script

12
etc/init/nscd.conf Normal file
View File

@ -0,0 +1,12 @@
description "Startup nscd"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on ( runlevel [12345] and (stopped routing))
stop on (runlevel [06] and stopping udev)
console none
respawn
exec /usr/sbin/nscd -f /etc/nscd.conf -d

View File

@ -15,26 +15,24 @@ script
sed -e "/^#/d" /etc/sysconfig/net/gateways | \
sed -e "/^ *$/d" >/tmp/gateways
exec 3</tmp/gateways
read <&3 TYPE NETWORK OPTION GW NETMASK
while [ $TYPE ]; do
while read <&3 TYPE NETWORK OPTION GW NETMASK; do
if [ "$OPTION" == "dev" ]; then
route add -$TYPE $NETWORK netmask $NETMASK dev $GW
/sbin/route add -$TYPE $NETWORK netmask $NETMASK dev $GW
status_message "Device route to $NETWORK with $NETMASK on $GW"
fi
if [ "$OPTION" == "gw" ]; then
route add -$TYPE $NETWORK netmask $NETMASK gw $GW
/sbin/route add -$TYPE $NETWORK netmask $NETMASK gw $GW
status_message "Net Route to $NETWORK with $NETMASK and gw $GW"
fi
read <&3 TYPE NETWORK OPTION GW NETMASK
done
exec 3>&-
rm /tmp/gateways
fi
if [ -f /etc/sysconfig/net/defaultrouter ]; then
route add default gw `cat /etc/sysconfig/net/defaultrouter`
/sbin/route add default gw `cat /etc/sysconfig/net/defaultrouter`
status_message "Default Router set to `cat /etc/sysconfig/net/defaultrouter`"
fi
NUMIF=`ip -f inet addr show|grep inet|grep -v "host lo"|wc -l`
NUMIF=`/sbin/ip -f inet addr show|/bin/grep inet|/bin/grep -v "host lo"|wc -l`
if [ $NUMIF -gt 2 ]; then
echo "1" >/proc/sys/net/ipv4/ip_forward
status_message "Enable of ip_forwarding"

View File

@ -4,7 +4,7 @@ version 1.0
emits none special
start on ( runlevel [12345] and (stopped routing))
stop on (runlevel [S06] and stopping udev)
stop on (runlevel [06] and stopping udev)
console none

View File

@ -4,7 +4,7 @@ version 1.0
emits none special
start on ( runlevel [2345] and ( started udev ))
stop on ( runlevel [S016] and ( stopping udev ))
stop on ( runlevel [016] and ( stopping udev ))
respawn
exec /sbin/agetty /dev/tty2 9600

View File

@ -4,7 +4,7 @@ version 1.0
emits none special
start on ( runlevel [2345] and (started udev))
stop on ( runlevel [S016] and (stopping udev))
stop on ( runlevel [016] and (stopping udev))
respawn
exec /sbin/agetty /dev/tty3 9600

View File

@ -4,7 +4,7 @@ version 1.0
emits none special
start on ( runlevel [2345] and (started udev))
stop on ( runlevel [S016] and (stopping udev))
stop on ( runlevel [016] and (stopping udev))
respawn
exec /sbin/agetty /dev/tty4 9600

View File

@ -4,7 +4,7 @@ version 1.0
emits none special
start on ( runlevel [2345] and (started udev))
stop on ( runlevel [S016] and (stopping udev))
stop on ( runlevel [016] and (stopping udev))
respawn
exec /sbin/agetty /dev/tty5 9600

View File

@ -4,7 +4,7 @@ version 1.0
emits none special
start on ( runlevel [2345] and (started udev))
stop on ( runlevel [S016] and (stopping udev))
stop on ( runlevel [016] and (stopping udev))
respawn
exec /sbin/agetty /dev/tty6 9600

View File

@ -27,9 +27,13 @@ pre-start script
/bin/mkdir -p /dev/shm
/bin/mkdir -p /dev/pts
/bin/mount -n -t tmpfs -o mode=1755 none /dev/shm
/bin/mknod /dev/null c 1 3
if [ ! -c /dev/null ]; then
/bin/mknod /dev/null c 1 3
fi
/bin/chmod 666 /dev/null
/bin/mknod /dev/console c 5 1
if [ ! -c /dev/console ]; then
/bin/mknod /dev/console c 5 1
fi
status_message "udev prestart ready"
end script

View File

@ -3,7 +3,7 @@ author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on ( runlevel [06] and ( stopping udev )
start on ( (runlevel [06]) and ( stopping udev ))
pre-start script
echo "unload all modules"