X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=b69f79c30c2de8c7fcda8d106552bc6baf08c99f;hp=c61cb6c0a8e456d7856bb5af0c069039bb7a0e9d;hb=27914b00e672a70311c89e2c462c83ef11c4da3b;hpb=31fd87f45ce0cd0014fbe67111741a812a654a86 diff --git a/autoconfig.functions b/autoconfig.functions index c61cb6c..b69f79c 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -354,8 +354,9 @@ config_hostname(){ if checkbootparam 'hostname' ; then HOSTNAME="$(getbootparam 'hostname' 2>>$DEBUG)" einfo "Setting hostname to $HOSTNAME as requested." - sed -i "s/^127.0.0.1.*localhost/127.0.0.1 $HOSTNAME localhost/" /etc/hosts - hostname $HOSTNAME ; eend $? + grml-hostname $HOSTNAME >>$DEBUG ; RC=$? + [ "$RC" = "0" ] && hostname $HOSTNAME + eend $RC else hostname --file /etc/hostname fi @@ -1426,10 +1427,11 @@ else eend 0 else SKIP_CPU_GOVERNOR=1 - eend $1 + eend $RC fi else - ewarn "Could not detect an appropriate CPU for use with cpu frequency scaling - skipping." && eend 1 + ewarn "Could not detect an appropriate CPU for use with cpu frequency scaling - skipping." + eend 1 fi # $MODULE fi # loadcpufreq