Compare commits

...

No commits in common. "v963" and "v962" have entirely different histories.
v963 ... v962

7 changed files with 36 additions and 43 deletions

View File

@ -14,12 +14,13 @@ script
rm /etc/mtab
touch /etc/mtab
mount -o remount,ro /
mount -o remount,rw -t proc none /proc &&
mount -t proc none /proc
status_message "/proc mounted"
if mount|grep /dev/root|grep nfs &>/dev/null; then
/sbin/initctl emit varmake
status_message "emitting varmake"
else
umount /proc
mount -t tmpfs none /var/lock
/sbin/initctl emit startudev
status_message "emitting startudev"

13
etc/init/klogd.conf Normal file
View File

@ -0,0 +1,13 @@
description "Startup Kernel Logging daemon"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on ( runlevel [12345] and (stopped mountfs))
stop on ( runlevel [06] and (stopping udev))
pre-start script
echo "Starting kernel log daemon"
end script
exec /usr/sbin/klogd -n -f /var/log/kern.log

View File

@ -9,4 +9,4 @@ stop on (runlevel [06] and stopping udev)
console none
respawn
exec /sbin/rsyslogd -n
exec /usr/sbin/syslogd -n -m 0

View File

@ -10,7 +10,7 @@ console output
pre-start script
source /etc/init/functions
echo "Starting udev"
mount -t sysfs none /sys &&
mount -t sysfs none /sys
status_message "udev: mount sysfs"
if [ ! -d /var/lock/subsys ]; then
mkdir /var/lock/subsys
@ -18,21 +18,22 @@ pre-start script
if [ ! -d /dev ]; then
mkdir /dev
fi
if [ ! -c /dev/zero ]; then
mount -n -t tmpfs -o mode=0755 udev /dev &&
status_message "udev: tmpfs on /dev created"
mount -n -t tmpfs -o mode=0755 udev /dev
status_message "udev: tmpfs on /dev created"
if [ -d /lib/udev/devices ]; then
cp --preserve=all --recursive --remove-destination /lib/udev/devices/* /dev
status_message "udev: Static entries copied..."
fi
test -d /lib/udev/devices &&
cp --preserve=all --recursive --remove-destination /lib/udev/devices/* /dev &&
status_message "udev: Static entries copied..."
/bin/mkdir -p /dev/shm
/bin/mkdir -p /dev/pts
/bin/mount -n -t tmpfs -o mode=1755 none /dev/shm
test -c /dev/null ||
/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
test -c /dev/console ||
/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

@ -1,28 +0,0 @@
#!/bin/bash
PIDFILE=$1
if [ ! ${PIDFILE} ]; then
echo "Usage: $0 <pidfile>"
exit 10
fi
PID=$(cat ${PIDFILE}|head -1)
PSNAME=$(ps -ef|awk '{ if ( $2 == "'${PID}'" ) print $8 }'|cut -d "." -f1|sed -e "s/://g")
SEEKNAME=$(basename ${PIDFILE}|cut -d"." -f1)
if [ "${PSNAME}" ]; then
if echo ${SEEKNAME}|grep -q $(basename ${PSNAME}); then
logger -p info -t upstart "Found running Prozess ${PSNAME} for ${PIDFILE}; aborting startup"
exit 2
else
logger -p info -t upstart "PIDFILE ${PIDFILE} does not point to the correct running prozess"
logger -p info -t upstart "cleanup ${PIDFILE} and start the prozess"
rm ${PIDFILE}
exit 0
fi
else
logger -p info -t upstart "PIDFILE ${PIDFILE} does not point to any prozess"
logger -p info -t upstart "Cleanup ${PIDFILE} and start the prozess"
rm ${PIDFILE}
exit 0
fi

View File

@ -40,7 +40,13 @@ if pgrep vtun >/dev/null; then
fi
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
echo -n "Stopping dhclient for $DEV"
dhcpcd -k $DEV
DHPID=`ps -ef|grep dhclient|grep ${DEV}|awk '{print $2}'`
if [ "$DHPID" ]; then
kill $DHPID
fi
evaluate_retval
echo -n "Shutting down Interface $DEV"
ifconfig $DEV 0.0.0.0 down
evaluate_retval
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
HOST=`cat /etc/sysconfig/net/hostname.${DEV}|awk '{print $1}'`

View File

@ -90,7 +90,7 @@ if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
#only if there is a link, we will setup the interface..
if CheckForLink ${DEV}; then
echo -n "Setting up ${DEV} with dhcp"
dhcpcd -q ${DEV}
dhclient -q ${DEV}
evaluate_retval
else
ifconfig ${DEV} down