diff options
author | Tom Gundersen <teg@jklm.no> | 2011-06-01 16:57:17 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2011-06-01 16:57:17 +0200 |
commit | 9f54e01053f1db170fc5c7528e15a0d3a82dd09d (patch) | |
tree | ac400f2258aed3dd06baef8c548407418b443f6a | |
parent | e8db800bc4dee8e1a4e4df64457f0fd7c5aedd04 (diff) |
fixup: stat_busy/stat_done -> status
Commit d8796827 introduced a minor bug, this fixes it.
We alse add some indentation to avoid future confusion.
Signed-off-by: Tom Gundersen <teg@jklm.no>
-rwxr-xr-x | rc.sysinit | 92 |
1 files changed, 46 insertions, 46 deletions
@@ -90,8 +90,8 @@ run_hook sysinit_udevlaunched # Trigger udev uevents if /bin/pidof /sbin/udevd &>/dev/null; then stat_busy "Triggering UDev uevents" - /sbin/udevadm trigger --action=add --type=subsystems - /sbin/udevadm trigger --action=add --type=devices + /sbin/udevadm trigger --action=add --type=subsystems + /sbin/udevadm trigger --action=add --type=devices stat_done fi @@ -275,20 +275,21 @@ if [[ -x /sbin/fsck ]]; then stat_done fi -status "Mounting Local Filesystems" /bin/mount -n -o remount,rw / +stat_busy "Mounting Local Filesystems" + /bin/mount -n -o remount,rw / -# don't touch /etc/mtab if it is a symlink to /proc/self/mounts -if [[ -L /etc/mtab ]]; then - : -elif [[ -x /bin/findmnt && -e /proc/self/mountinfo ]]; then - /bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab -else - cat /proc/mounts >| /etc/mtab -fi + # don't touch /etc/mtab if it is a symlink to /proc/self/mounts + if [[ -L /etc/mtab ]]; then + : + elif [[ -x /bin/findmnt && -e /proc/self/mountinfo ]]; then + /bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab + else + cat /proc/mounts >| /etc/mtab + fi -run_hook sysinit_premount -# now mount all the local filesystems -/bin/mount -a -t $NETFS -O no_netdev + run_hook sysinit_premount + # now mount all the local filesystems + /bin/mount -a -t $NETFS -O no_netdev stat_done # enable monitoring of lvm2 groups, now that the filesystems are mounted rw @@ -312,17 +313,17 @@ if [[ -f $RANDOM_SEED ]]; then fi stat_busy "Removing Leftover Files" -/bin/rm -rf /etc/{nologin,shutdownpid} /forcefsck &>/dev/null -/bin/rm -rf /tmp/* /tmp/.* &>/dev/null -[[ ! -L /var/lock ]] && /bin/rm -rf /var/lock/* -[[ ! -L /var/run && -d /var/run ]] && /usr/bin/find /var/run/ \! -type d -delete -[[ ! -L /var/run && ! -L /var/run/daemons ]] && /bin/rm -rf /var/run/daemons \ + /bin/rm -rf /etc/{nologin,shutdownpid} /forcefsck &>/dev/null + /bin/rm -rf /tmp/* /tmp/.* &>/dev/null + [[ ! -L /var/lock ]] && /bin/rm -rf /var/lock/* + [[ ! -L /var/run && -d /var/run ]] && /usr/bin/find /var/run/ \! -type d -delete + [[ ! -L /var/run && ! -L /var/run/daemons ]] && /bin/rm -rf /var/run/daemons \ && /bin/ln -s /run/daemons /var/run/daemons -: >| /var/run/utmp -/bin/chmod 0664 /var/run/utmp -/bin/chown root:utmp /var/run/utmp -# Keep {x,k,g}dm happy with xorg -/bin/mkdir -m1777 /tmp/.{X11,ICE}-unix + : >| /var/run/utmp + /bin/chmod 0664 /var/run/utmp + /bin/chown root:utmp /var/run/utmp + # Keep {x,k,g}dm happy with xorg + /bin/mkdir -m1777 /tmp/.{X11,ICE}-unix stat_done if [[ $HOSTNAME ]]; then @@ -337,33 +338,33 @@ if [[ $NISDOMAINNAME ]]; then fi stat_busy "Setting Locale: ${LOCALE:=en_US}" -# Flush old locale settings -: >| /etc/profile.d/locale.sh -/bin/chmod 755 /etc/profile.d/locale.sh -# Set user defined locale -echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh + # Flush old locale settings + : >| /etc/profile.d/locale.sh + /bin/chmod 755 /etc/profile.d/locale.sh + # Set user defined locale + echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh stat_done if [[ ${LOCALE,,} =~ utf ]]; then stat_busy "Setting Consoles to UTF-8 mode" - # UTF-8 consoles are default since 2.6.24 kernel - # this code is needed not only for older kernels, - # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8. - for i in /dev/tty[0-9]*; do - /usr/bin/kbd_mode -u < ${i} - printf "\e%%G" > ${i} - done - echo 1 > /sys/module/vt/parameters/default_utf8 + # UTF-8 consoles are default since 2.6.24 kernel + # this code is needed not only for older kernels, + # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8. + for i in /dev/tty[0-9]*; do + /usr/bin/kbd_mode -u < ${i} + printf "\e%%G" > ${i} + done + echo 1 > /sys/module/vt/parameters/default_utf8 stat_done [[ $KEYMAP ]] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u $KEYMAP else stat_busy "Setting Consoles to legacy mode" - # make non-UTF-8 consoles work on 2.6.24 and newer kernels - for i in /dev/tty[0-9]*; do - /usr/bin/kbd_mode -a < ${i} - printf "\e%%@" > ${i} - done - echo 0 > /sys/module/vt/parameters/default_utf8 + # make non-UTF-8 consoles work on 2.6.24 and newer kernels + for i in /dev/tty[0-9]*; do + /usr/bin/kbd_mode -a < ${i} + printf "\e%%@" > ${i} + done + echo 0 > /sys/module/vt/parameters/default_utf8 stat_done [[ $KEYMAP ]] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP fi @@ -376,9 +377,8 @@ set_consolefont # we therefore need to copy this from /run to /etc. This functionality is going away one day. for f in cd net; do [[ -f /run/udev/tmp-rules--70-persistent-$f.rules ]] || continue - stat_busy "Adding persistent $f udev rules" - /bin/cat "/run/udev/tmp-rules--70-persistent-$f.rules" >> "/etc/udev/rules.d/70-persistent-$f.rules" - stat_done + status "Adding persistent $f udev rules" \ + /bin/cat "/run/udev/tmp-rules--70-persistent-$f.rules" >> "/etc/udev/rules.d/70-persistent-$f.rules" done /bin/dmesg >| /var/log/dmesg.log |