Replace bootparameter values with x instead of VALUE
[grml-autoconfig.git] / autoconfig.functions
index 2f7e313..ba8a13e 100755 (executable)
@@ -1347,7 +1347,7 @@ config_stats() {
    [ -e /etc/grml_version ] && VERSION=$(cat /etc/grml_version) || \
      VERSION=$(lsb_release -d | awk -F: '{gsub(/^[ \t]+/, "", $2); print $2}')
 
-   PARAMS="$( echo "$CMDLINE" | sed -e 's/=[^ ]*/=VALUE/g' | tr " " "\n"|sort|tr "\n" " " )"
+   PARAMS="$( echo "$CMDLINE" | sed -e 's/=[^ ]*/=x/g' | tr " " "\n"|sort|tr "\n" " " )"
 
    echo "$CMDLINE" | grep -q -e "fetch|nfsroot" && BOOT="remote"
    [ -z "$BOOT" ] && BOOT="local"
@@ -1356,7 +1356,7 @@ config_stats() {
    ( [ -n "$COLUMNS" ] && [ -n "$LINES" ] ) && \
      ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS&res=$((COLUMNS * 8))x$((LINES * 16))"
 
-   URI='$BASE_URL?action=${ACTION_NAME}\&$DATE_STRING\&unique_id=${HOST_ID}\&support_64bit=$HAS_64BIT\&version=$version\&bootup=$BOOT\&params=$PARAMS$ADDITIONAL_PARAMS'
+   URI='$BASE_URL?action=${ACTION_NAME}\&$DATE_STRING\&unique_id=${HOST_ID}\&support_64bit=$HAS_64BIT\&version=$VERSION\&bootup=$BOOT\&params=$PARAMS$ADDITIONAL_PARAMS'
 
    get_remote_file "$URI" "/dev/null"  >/dev/null 2>&1 &!
  fi
@@ -1379,8 +1379,7 @@ if checkbootparam 'startx' && ! echo "$CMDLINE" | grep -q 'startx.*nostartx' ; t
   if [ -z "$INSTALLED" ] ; then
    WINDOWMANAGER="$(getbootparam 'startx' 2>>$DEBUG)"
    if [ -z "$WINDOWMANAGER" ] ; then
-     einfo "No window manager specified. Taking ${WHITE}wm-ng${NORMAL} as default." && eend 0
-     WINDOWMANAGER="wm-ng"
+     einfo "No window manager specified. Using default one." && eend 0
    else
      einfo "Window manager ${WHITE}${WINDOWMANAGER}${NORMAL} found as bootoption." && eend 0
    fi
@@ -1388,7 +1387,7 @@ if checkbootparam 'startx' && ! echo "$CMDLINE" | grep -q 'startx.*nostartx' ; t
    config_userfstab || fstabuser='grml'
  cat>|/etc/init.d/xstartup<<EOF
 #!/bin/sh
-su $fstabuser -c "/usr/bin/grml-x $WINDOWMANAGER"
+su $fstabuser -c "/usr/bin/grml-x"
 EOF
    chmod 755 /etc/init.d/xstartup