Compare commits
No commits in common. "v963" and "v962" have entirely different histories.
@ -14,12 +14,13 @@ script
|
|||||||
rm /etc/mtab
|
rm /etc/mtab
|
||||||
touch /etc/mtab
|
touch /etc/mtab
|
||||||
mount -o remount,ro /
|
mount -o remount,ro /
|
||||||
mount -o remount,rw -t proc none /proc &&
|
mount -t proc none /proc
|
||||||
status_message "/proc mounted"
|
status_message "/proc mounted"
|
||||||
if mount|grep /dev/root|grep nfs &>/dev/null; then
|
if mount|grep /dev/root|grep nfs &>/dev/null; then
|
||||||
/sbin/initctl emit varmake
|
/sbin/initctl emit varmake
|
||||||
status_message "emitting varmake"
|
status_message "emitting varmake"
|
||||||
else
|
else
|
||||||
|
umount /proc
|
||||||
mount -t tmpfs none /var/lock
|
mount -t tmpfs none /var/lock
|
||||||
/sbin/initctl emit startudev
|
/sbin/initctl emit startudev
|
||||||
status_message "emitting startudev"
|
status_message "emitting startudev"
|
||||||
|
13
etc/init/klogd.conf
Normal file
13
etc/init/klogd.conf
Normal 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
|
@ -9,4 +9,4 @@ stop on (runlevel [06] and stopping udev)
|
|||||||
console none
|
console none
|
||||||
|
|
||||||
respawn
|
respawn
|
||||||
exec /sbin/rsyslogd -n
|
exec /usr/sbin/syslogd -n -m 0
|
@ -10,7 +10,7 @@ console output
|
|||||||
pre-start script
|
pre-start script
|
||||||
source /etc/init/functions
|
source /etc/init/functions
|
||||||
echo "Starting udev"
|
echo "Starting udev"
|
||||||
mount -t sysfs none /sys &&
|
mount -t sysfs none /sys
|
||||||
status_message "udev: mount sysfs"
|
status_message "udev: mount sysfs"
|
||||||
if [ ! -d /var/lock/subsys ]; then
|
if [ ! -d /var/lock/subsys ]; then
|
||||||
mkdir /var/lock/subsys
|
mkdir /var/lock/subsys
|
||||||
@ -18,21 +18,22 @@ pre-start script
|
|||||||
if [ ! -d /dev ]; then
|
if [ ! -d /dev ]; then
|
||||||
mkdir /dev
|
mkdir /dev
|
||||||
fi
|
fi
|
||||||
if [ ! -c /dev/zero ]; then
|
mount -n -t tmpfs -o mode=0755 udev /dev
|
||||||
mount -n -t tmpfs -o mode=0755 udev /dev &&
|
|
||||||
status_message "udev: tmpfs on /dev created"
|
status_message "udev: tmpfs on /dev created"
|
||||||
fi
|
if [ -d /lib/udev/devices ]; then
|
||||||
test -d /lib/udev/devices &&
|
cp --preserve=all --recursive --remove-destination /lib/udev/devices/* /dev
|
||||||
cp --preserve=all --recursive --remove-destination /lib/udev/devices/* /dev &&
|
|
||||||
status_message "udev: Static entries copied..."
|
status_message "udev: Static entries copied..."
|
||||||
|
fi
|
||||||
/bin/mkdir -p /dev/shm
|
/bin/mkdir -p /dev/shm
|
||||||
/bin/mkdir -p /dev/pts
|
/bin/mkdir -p /dev/pts
|
||||||
/bin/mount -n -t tmpfs -o mode=1755 none /dev/shm
|
/bin/mount -n -t tmpfs -o mode=1755 none /dev/shm
|
||||||
test -c /dev/null ||
|
if [ ! -c /dev/null ]; then
|
||||||
/bin/mknod /dev/null c 1 3 &&
|
/bin/mknod /dev/null c 1 3
|
||||||
|
fi
|
||||||
/bin/chmod 666 /dev/null
|
/bin/chmod 666 /dev/null
|
||||||
test -c /dev/console ||
|
if [ ! -c /dev/console ]; then
|
||||||
/bin/mknod /dev/console c 5 1
|
/bin/mknod /dev/console c 5 1
|
||||||
|
fi
|
||||||
status_message "udev prestart ready"
|
status_message "udev prestart ready"
|
||||||
end script
|
end script
|
||||||
|
|
||||||
|
@ -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
|
|
@ -40,7 +40,13 @@ if pgrep vtun >/dev/null; then
|
|||||||
fi
|
fi
|
||||||
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
|
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
|
||||||
echo -n "Stopping dhclient for $DEV"
|
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
|
evaluate_retval
|
||||||
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
|
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
|
||||||
HOST=`cat /etc/sysconfig/net/hostname.${DEV}|awk '{print $1}'`
|
HOST=`cat /etc/sysconfig/net/hostname.${DEV}|awk '{print $1}'`
|
||||||
|
@ -90,7 +90,7 @@ if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
|
|||||||
#only if there is a link, we will setup the interface..
|
#only if there is a link, we will setup the interface..
|
||||||
if CheckForLink ${DEV}; then
|
if CheckForLink ${DEV}; then
|
||||||
echo -n "Setting up ${DEV} with dhcp"
|
echo -n "Setting up ${DEV} with dhcp"
|
||||||
dhcpcd -q ${DEV}
|
dhclient -q ${DEV}
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
else
|
else
|
||||||
ifconfig ${DEV} down
|
ifconfig ${DEV} down
|
||||||
|
Loading…
Reference in New Issue
Block a user