ubuntuusers.de

rc.sysinit

Autor:
Vorkriegshippie
Datum:
1. Juli 2009 14:54
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions

/bin/mount -n -t ramfs none /dev &
/bin/mount -n -t proc none /proc &

/bin/mknod /dev/null c 1 3
/bin/mknod /dev/zero c 1 5
/bin/mknod /dev/console c 5 1

/bin/mount -n -t sysfs none /sys &

/bin/mknod /dev/sda5 b 8 5
/bin/mknod /dev/sda6 b 8 6
/bin/mknod /dev/sda7 b 8 7
/bin/mknod /dev/sda8 b 8 8
/bin/mknod /dev/sda9 b 8 9
/bin/mknod /dev/sda11 b 8 11

/bin/mkdir /dev/pts &
/bin/mkdir /dev/shm &

/bin/cp -a /lib/udev/devices/* /dev/

echo > /proc/sys/kernel/hotplug

if [ -x /sbin/udevadm -a -d /sys/block ]; then
	stat_busy "Starting UDev Daemon"
	/sbin/udevd --daemon &
	/sbin/udevadm trigger &
	stat_done
else
	status "Using static /dev filesystem" true
fi

/sbin/udevadm settle &

if [ -d /sys/class/net/lo ]; then
	stat_busy "Bringing up loopback interface"
	/sbin/ifconfig lo 127.0.0.1 up
	if [ $? -ne 0 ]; then
		stat_fail
	else
		stat_done
	fi
fi

status "Mounting Root Read-only" /bin/mount -n -o remount,ro /

stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
/bin/rm -f /etc/mtab*
/bin/mount -o remount,rw /
if [ -e /proc/mounts ]; then
	/bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
fi

/bin/mount -a
stat_done

status "Activating Swap" /sbin/swapon -a &

if [ -f /var/run/random-seed ]; then
	stat_busy "Initializing Random Seed"
	/bin/cat /var/run/random-seed >/dev/urandom &
	stat_done
fi

stat_busy "Removing Leftover Files"
/bin/rm -f /etc/nologin &>/dev/null &
/bin/rm -f /etc/shutdownpid &>/dev/null &
/bin/rm -f /var/lock/* &>/dev/null &
/bin/rm -rf /tmp/* /tmp/.* &>/dev/null &
(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
: > /var/run/utmp
/bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix &
stat_done

status "Setting Hostname: bluescreen" /bin/hostname bluescreen
status "Updating Module Dependencies" /sbin/depmod -A &


: >/etc/profile.d/locale.sh
/bin/chmod 755 /etc/profile.d/locale.sh
stat_busy "Setting Locale: de_DE.utf8"
echo "export LANG=de_DE.utf8" >>/etc/profile.d/locale.sh
stat_done

status "Loading Keyboard Map: de-latin1-nodeadkeys" /bin/loadkeys -q -u de-latin1-nodeadkeys &

for i in $(/usr/bin/seq 0 4); do
  printf "\e(K" > /dev/vc/${i}
done
  echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh
stat_done