/[baselayout]/trunk/init.d/bootmisc
Gentoo

Diff of /trunk/init.d/bootmisc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2774 Revision 2775
24 sysctl -p /etc/sysctl.conf >/dev/null 24 sysctl -p /etc/sysctl.conf >/dev/null
25 eend $? 25 eend $?
26 fi 26 fi
27 fi 27 fi
28 28
29 if ! touch -c /var/run 2> /dev/null ; then 29 if ! echo 2>/dev/null >/var/run/.test.$$ ; then
30 ewarn "Skipping /var and /tmp initialization (ro root?)" 30 ewarn "Skipping /var and /tmp initialization (ro root?)"
31 return 0 31 return 0
32 fi 32 fi
33 rm -f /var/run/.test.$$
33 34
34 if [ "${RC_UNAME}" = "Linux" ] ; then 35 if [ "${RC_UNAME}" = "Linux" ] ; then
35 # Setup login records 36 # Setup login records
36 > /var/run/utmp 37 echo > /var/run/utmp
37 touch /var/log/wtmp 38 [ -e /var/log/wtmp ] || echo > /var/log/wtmp
38 chgrp utmp /var/run/utmp /var/log/wtmp 39 chgrp utmp /var/run/utmp /var/log/wtmp
39 chmod 0664 /var/run/utmp /var/log/wtmp 40 chmod 0664 /var/run/utmp /var/log/wtmp
40 fi 41 fi
41 42
42 ebegin "Updating environment" 43 ebegin "Updating environment"
70 /sbin/pam_console_apply -r 71 /sbin/pam_console_apply -r
71 fi 72 fi
72 fi 73 fi
73 74
74 # Create the .keep to stop portage from removing /var/lock 75 # Create the .keep to stop portage from removing /var/lock
75 > /var/lock/.keep 76 echo > /var/lock/.keep
76 eend 0 77 eend 0
77 78
78 # Clean up /tmp directory 79 # Clean up /tmp directory
79 if [ -d /tmp ] ; then 80 if [ -d /tmp ] ; then
80 cd /tmp 81 cd /tmp
118 [ -x /sbin/restorecon ] && restorecon /tmp/.ICE-unix /tmp/.X11-unix 119 [ -x /sbin/restorecon ] && restorecon /tmp/.ICE-unix /tmp/.X11-unix
119 fi 120 fi
120 121
121 # Create an 'after-boot' dmesg log 122 # Create an 'after-boot' dmesg log
122 if [ "${RC_SYS}" != "VPS" ] ; then 123 if [ "${RC_SYS}" != "VPS" ] ; then
123 touch /var/log/dmesg 124 dmesg > /var/log/dmesg
124 chmod 640 /var/log/dmesg 125 chmod 640 /var/log/dmesg
125 dmesg > /var/log/dmesg
126 fi 126 fi
127 127
128 # Check for /etc/resolv.conf, and create if missing 128 # Check for /etc/resolv.conf, and create if missing
129 [ -f /etc/resolv.conf ] || touch /etc/resolv.conf 2>/dev/null 129 [ -e /etc/resolv.conf ] || echo >/etc/resolv.conf
130} 130}
131 131
132stop() { 132stop() {
133 # Reset pam_console permissions if we are actually using it 133 # Reset pam_console permissions if we are actually using it
134 if [ -x /sbin/pam_console_apply -a ! -c /dev/.devfsd ] && \ 134 if [ -x /sbin/pam_console_apply -a ! -c /dev/.devfsd ] && \

Legend:
Removed from v.2774  
changed lines
  Added in v.2775

  ViewVC Help
Powered by ViewVC 1.1.20