Compare commits
No commits in common. "v962" and "v963" have entirely different histories.
@ -14,13 +14,12 @@ script
|
||||
rm /etc/mtab
|
||||
touch /etc/mtab
|
||||
mount -o remount,ro /
|
||||
mount -t proc none /proc
|
||||
mount -o remount,rw -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"
|
||||
|
@ -1,13 +0,0 @@
|
||||
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
|
||||
|
||||
respawn
|
||||
exec /usr/sbin/syslogd -n -m 0
|
||||
exec /sbin/rsyslogd -n
|
@ -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,22 +18,21 @@ pre-start script
|
||||
if [ ! -d /dev ]; then
|
||||
mkdir /dev
|
||||
fi
|
||||
mount -n -t tmpfs -o mode=0755 udev /dev
|
||||
if [ ! -c /dev/zero ]; then
|
||||
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
|
||||
if [ ! -c /dev/null ]; then
|
||||
/bin/mknod /dev/null c 1 3
|
||||
fi
|
||||
test -c /dev/null ||
|
||||
/bin/mknod /dev/null c 1 3 &&
|
||||
/bin/chmod 666 /dev/null
|
||||
if [ ! -c /dev/console ]; then
|
||||
test -c /dev/console ||
|
||||
/bin/mknod /dev/console c 5 1
|
||||
fi
|
||||
status_message "udev prestart ready"
|
||||
end script
|
||||
|
||||
|
28
sbin/CheckPid
Executable file
28
sbin/CheckPid
Executable file
@ -0,0 +1,28 @@
|
||||
#!/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,13 +40,7 @@ if pgrep vtun >/dev/null; then
|
||||
fi
|
||||
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
|
||||
echo -n "Stopping dhclient for $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
|
||||
dhcpcd -k $DEV
|
||||
evaluate_retval
|
||||
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
|
||||
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..
|
||||
if CheckForLink ${DEV}; then
|
||||
echo -n "Setting up ${DEV} with dhcp"
|
||||
dhclient -q ${DEV}
|
||||
dhcpcd -q ${DEV}
|
||||
evaluate_retval
|
||||
else
|
||||
ifconfig ${DEV} down
|
||||
|
Loading…
Reference in New Issue
Block a user