updated on Thu Jan 26 12:02:26 UTC 2012
[aur-mirror.git] / quick-init-751h / qinit.multi
blobd3a83071b22b3588f08bea096774ce198469a850
1 #!/bin/bash
3 # /etc/rc.multi
6 . /etc/rc.conf
7 . /etc/rc.d/functions
9 # Starting HAL
10 if [ -x /etc/rc.d/hal ]; then
11 /etc/rc.d/hal start
14 # Starting UDEV
15 if [ -x /sbin/udevadm ]; then
16 /sbin/udevd --daemon
18 if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
19 /sbin/udevadm trigger &
21 if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
22 /sbin/udevadm settle
25 ## Starting wicd
26 #if [ -x /etc/rc.d/wicd ]; then
27 # /etc/rc.d/wicd start &
28 #fi
30 # Activating Swap
31 /sbin/swapon -a
34 stat_busy "Configuring System Clock"
35 if [ ! -f /var/lib/hwclock/adjtime ]; then
36 echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
38 if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
39 /bin/rm -f /etc/localtime
40 /bin/cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
43 if [ -n "$HWCLOCK_PARAMS" ]; then
44 /sbin/hwclock --adjust #Adjust for system drift
45 /sbin/hwclock $HWCLOCK_PARAMS
47 stat_done
49 RANDOM_SEED=/var/lib/misc/random-seed
50 if [ -f $RANDOM_SEED ]; then
51 stat_busy "Initializing Random Seed"
52 /bin/cat $RANDOM_SEED > /dev/urandom
53 stat_done
57 # Load sysctl variables if sysctl.conf is present
58 [ -r /etc/sysctl.conf ] && /sbin/sysctl -q -p &>/dev/null
60 # Start daemons
61 for daemon in "${DAEMONS[@]}"; do
62 if [ "$daemon" = "${daemon#!}" ]; then
63 if [ "$daemon" = "${daemon#@}" ]; then
64 start_daemon $daemon
65 else
66 start_daemon_bkgd ${daemon:1}
69 done
72 # Set the NIS domain name, if necessary
73 [ -f /etc/conf.d/nisdomainname ] && . /etc/conf.d/nisdomainname
74 if [ "$NISDOMAINNAME" != "" ]; then
75 status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname $NISDOMAINNAME
79 # Adding persistent network/cdrom generated rules
80 if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
81 stat_busy "Adding persistent cdrom udev rules"
82 /bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
83 stat_done
85 if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
86 stat_busy "Adding persistent network udev rules"
87 /bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
88 stat_done
91 /bin/dmesg >| /var/log/dmesg.log