X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=1ea56081edb5d5d3863f23acf09371af366b69e4;hp=ab9d8333a2690164878ed4d1a9240a0aca0f2296;hb=9bb58dc271a33919c9a7513335dcaa373da489a5;hpb=796bdc7d4b440661244a3202a957e7fbb95ffafe diff --git a/autoconfig.functions b/autoconfig.functions index ab9d833..1ea5608 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -335,8 +335,20 @@ config_time(){ checkbootparam utc >>$DEBUG 2>&1 && UTC="-u" checkbootparam gmt >>$DEBUG 2>&1 && UTC="-u" # hwclock uses the TZ variable - export TZ - hwclock $UTC -s + if [ -r /etc/default/locale ] ; then + . /etc/default/locale + else + TZ=Europe/Vienna + fi + ERROR=$(TZ="$TZ" hwclock $UTC -s 2>&1) ; RC=$? + if [ -n "$ERROR" ] ; then + eindent + ERROR=$(TZ="$TZ" hwclock $UTC -s --directisa 2>&1) + if [ -n "$ERROR" ] ; then + eerror "Problem running hwclock: $ERROR" ; eend 1 + fi + eoutdent + fi fi } # }}} @@ -964,7 +976,9 @@ if [ -n "$partitions" ]; then case "$f" in swap) eindent if [ -n "$NOSWAP" ]; then - ewarn "Ignoring swap partition ${WHITE}$p${NORMAL}. (Force usage via boot option 'swap', or execute grml-swapon)" ; eend 0 + if [ -z "$INSTALLED" ] ; then + ewarn "Ignoring swap partition ${WHITE}$p${NORMAL}. (Force usage via boot option 'swap', or execute grml-swapon)" ; eend 0 + fi else case "$(dd if=$p bs=1 count=6 skip=4086 2>/dev/null)" in S1SUSP|S2SUSP|pmdisk|[zZ]*) @@ -1917,7 +1931,7 @@ config_swraid(){ if ! checkbootparam 'swraid' ; then eindent - einfo "Just run 'Start mdadm-raid' to assemble md arrays or boot using swraid bootoption for autostart." + einfo "Just run 'Start mdadm-raid' to assemble md arrays or boot using 'swraid' as bootoption for autostart." eoutdent else einfo "Bootoption swraid found. Searching for software RAID arrays:"