Vorbereitung auf upstart
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_cdboot@5575 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
parent
2ac3da09d0
commit
e2edb76e69
11
etc/init/checkfs.conf
Normal file
11
etc/init/checkfs.conf
Normal file
@ -0,0 +1,11 @@
|
||||
description "Check Filesystems"
|
||||
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||||
version 1.0
|
||||
emits none special
|
||||
|
||||
start on stopped initlvm
|
||||
|
||||
console output
|
||||
script
|
||||
tar -C / -zxf /dev/floppy/0
|
||||
end script
|
29
etc/init/checkvar.conf
Normal file
29
etc/init/checkvar.conf
Normal file
@ -0,0 +1,29 @@
|
||||
description "Check if / ist nfs"
|
||||
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||||
version 1.0
|
||||
emits varmake startudev
|
||||
|
||||
|
||||
start on startup
|
||||
|
||||
console output
|
||||
script
|
||||
echo "Starting checkvar script"
|
||||
source /etc/init/functions
|
||||
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
|
||||
tar -C /var -zxpf /boot/var.tgz
|
||||
if [ ! -d /var/lock ]; then
|
||||
mkdir /var/lock
|
||||
fi
|
||||
mount -t tmpfs none /var/lock
|
||||
/sbin/initctl emit startudev
|
||||
status_message "emitting startudev"
|
||||
fi
|
||||
end script
|
17
etc/init/hostname.conf
Normal file
17
etc/init/hostname.conf
Normal file
@ -0,0 +1,17 @@
|
||||
description "Setup System Hostname"
|
||||
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||||
version 1.0
|
||||
emits none special
|
||||
|
||||
start on ( runlevel [S012345] and ( started udev ))
|
||||
|
||||
console none
|
||||
script
|
||||
if ip addr list dev eth0|grep -q inet; then
|
||||
IP=`ifconfig eth0|grep inet|awk '{print $2}'|cut -d ":" -f 2`
|
||||
echo "$IP ViitorLinux_install" >>/etc/hosts
|
||||
else
|
||||
sed -e "s/127\.0\.0\.1.*$/127.0.0.1 localhost ViitorLinux_install/" /etc/hosts >/tmp/hosts
|
||||
mv /tmp/hosts /var/etc/hosts
|
||||
fi
|
||||
end script
|
27
etc/init/mountfs.conf
Normal file
27
etc/init/mountfs.conf
Normal file
@ -0,0 +1,27 @@
|
||||
description "Mounting all Filesystem not depending on Network"
|
||||
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||||
version 1.0
|
||||
emits none special
|
||||
|
||||
start on stopped checkfs
|
||||
|
||||
console output
|
||||
script
|
||||
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
|
||||
echo -n "Mounting $MOUNTPOINT"
|
||||
mount $MOUNTPOINT
|
||||
evaluate_retval
|
||||
else
|
||||
echo "Mountpoint $MOUNTPOINT not existing!"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
end script
|
29
etc/init/xdm.conf
Normal file
29
etc/init/xdm.conf
Normal file
@ -0,0 +1,29 @@
|
||||
description "Startup autofs System for local configuration files"
|
||||
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||||
version 1.0
|
||||
emits none special
|
||||
|
||||
start on (runlevel [45] and (started rpc))
|
||||
stop on runlevel [01236]
|
||||
|
||||
console output
|
||||
|
||||
post-start script
|
||||
if [ ! -d /tmp/.ICE-unix ]; then
|
||||
mkdir /tmp/.ICE-unix
|
||||
chown root:root /tmp/.ICE-unix
|
||||
chmod 1777 /tmp/.ICE-unix
|
||||
fi
|
||||
end script
|
||||
|
||||
script
|
||||
if ls /etc/X11/xdm/*.xdm >/dev/null 2>&1; then
|
||||
XDM=`cat /etc/X11/xdm/*.xdm`
|
||||
dbus-launch --exit-with-session $XDM --nodaemon
|
||||
else
|
||||
source /etc/profile
|
||||
source /root/.bash_profile
|
||||
export HOME=/root
|
||||
startx
|
||||
fi
|
||||
end script
|
Loading…
Reference in New Issue
Block a user