[arch-projects] [initscripts][PATCH 1/2] rc.sysinit: support /etc/localtime as a symlink
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- rc.sysinit | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 9f215c4..17d3cc6 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -221,9 +221,15 @@ run_hook sysinit_postmount status "Activating Swap" swapon -a -[[ $TIMEZONE ]] && - status "Configuring Time Zone" \ +if [[ $TIMEZONE && -f /usr/share/zoneinfo/$TIMEZONE ]]; then + stat_busy "Configuring Time Zone" + if [[ ! -L /etc/localtime ]]; then cp --remove-destination "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime + elif [[ ! /etc/localtime -ef /usr/share/zoneinfo/$TIMEZONE ]]; then + ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime + fi + (( $? == 0 )) && stat_done || stat_fail +fi RANDOM_SEED=/var/lib/misc/random-seed [[ -f $RANDOM_SEED ]] && -- 1.7.6.3
This isn't _all_ your modules. Just the extras specified from rc.conf. Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- functions | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/functions b/functions index f68c088..aa65418 100644 --- a/functions +++ b/functions @@ -323,7 +323,7 @@ udevd_modprobe() { # Load modules from the MODULES array defined in rc.conf [[ -f /proc/modules ]] && (( ${#MODULES[*]} )) && - status "Loading Modules" modprobe -ab "${MODULES[@]}" + status "Loading User-specified Modules" modprobe -ab "${MODULES[@]}" status "Waiting for UDev uevents to be processed" \ udevadm settle --timeout=${UDEV_TIMEOUT:-30} -- 1.7.6.3
participants (1)
-
Dave Reisner