X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=8ae71d1a66b8e45855e5f70c2ccbfa536c011282;hp=fcbaead5d723258821b0c5887806fcc575d89796;hb=eedf0cbce6d2f8f5723a6716beb20099317235dc;hpb=e3af0148129e65305b20d9005b045e5b6f6c198d diff --git a/autoconfig.functions b/autoconfig.functions index fcbaead..8ae71d1 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -892,8 +892,7 @@ else eindent SKIP_CPU_GOVERNOR=1 oldIFS="$IFS" - IFS=" -" + IFS=$'\n' for line in $(grep FATAL "$LOADCPUFREQ" | sed 's/.*FATAL: //; s/ (.*)//') ; do eerror "$line" ; eend $RC done @@ -1155,8 +1154,7 @@ config_mixer () { CONTROLS=$(amixer -c $card scontrols | awk -F"Simple mixer control " '{print $2}') IFSOLD=${IFS:-} - IFS=' - ' + IFS=$'\n' for CONTROL in ${=CONTROLS} ; do # such devices can not be controlled with amixer ... unmute [[ "$CONTROL" == *Console* ]] && continue @@ -1319,6 +1317,10 @@ if checkbootparam 'startx' && ! echo "$CMDLINE" | grep -q 'startx.*nostartx' ; t einfo "Setting up and invoking grml-x ${WINDOWMANAGER}. Just exit X windows system to get full featured consoles." config_userlocal if $SYSTEMD ; then + if [ -n "$WINDOWMANAGER" ] ; then + mkdir -p /var/run/grml-x/ + echo "$WINDOWMANAGER" > /var/run/grml-x/window-manager + fi chvt 7 return fi @@ -1591,7 +1593,7 @@ config_swraid(){ if ! checkbootparam 'swraid' ; then eindent if $SYSTEMD ; then - einfo "Just run 'Start mdmonitor' to assemble md arrays or boot using 'swraid' as bootoption for autostart." + einfo "Just run 'mdadm --assemble --scan' to assemble md arrays or boot using 'swraid' as bootoption for autostart." else einfo "Just run 'Start mdadm-raid' to assemble md arrays or boot using 'swraid' as bootoption for autostart." fi @@ -1600,9 +1602,8 @@ config_swraid(){ einfo "Bootoption swraid found. Searching for software RAID arrays:" eindent IFSOLD=${IFS:-} - IFS=' -' - for line in $(mdadm --assemble --scan --auto=yes --symlink=no 2>&1) ; do + IFS=$'\n' + for line in $(mdadm --assemble --scan 2>&1) ; do case $line in *'No arrays found'*) ewarn "$line" ; eend 0 @@ -1622,8 +1623,7 @@ config_swraid(){ ewarn "No active arrays found" ; eend 0 else IFSOLD=${IFS:-} - IFS=' -' + IFS=$'\n' for line in $(grep '^md[0-9]' /proc/mdstat) ; do einfo "active arrays: $line" ; eend 0 done @@ -1657,8 +1657,7 @@ config_dmraid(){ [ -n "$1" ] || return 1 IFSOLD=${IFS:-} - IFS=' -' + IFS=$'\n' eindent for line in $(dmraid $1 ; echo errcode:$?); do @@ -1722,15 +1721,17 @@ config_lvm(){ einfo "You seem to have logical volumes (LVM) on your system." eindent if $SYSTEMD ; then - einfo "Just run 'Start lvm2-lvmetad' to activate them or boot using 'lvm' as bootoption for autostart." + einfo "Just run 'Start lvm2-pvscan@name' to activate LV or VG 'name' or boot using 'lvm' as bootoption for autostart." else einfo "Just run 'Start lvm2' to activate them or boot using 'lvm' as bootoption for autostart." fi eend 0 if checkbootparam 'lvm' ; then - einfo "Bootoption LVM found. Searching for logical volumes:" + einfo "Bootoption LVM found. Searching for logical volumes and enabling them:" if $SYSTEMD ; then - service_wrapper lvm2-lvmetad start ; eend $? + service_wrapper lvm2-lvmetad start + vgchange -ay + eend $? else service_wrapper lvm2 start ; eend $? fi