diff options
author | ramon <ramongomez@us.es> | 2016-08-24 09:32:03 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2016-08-24 09:32:03 +0000 |
commit | 0d9c5e1131e21a27a5b64d63a57cf23af72ea612 (patch) | |
tree | 8c7c4312368dcd1bb715910c5f83216244e1a564 /client | |
parent | 8792fedc02bfa3e9dee8b9b09be31c7fc8ee38a6 (diff) |
#724: Mantener resolución por defecto para drivers detectados por ogLive basado en Ubuntu 16.04 y distintos a {{{uvesafb}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4998 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rw-r--r-- | client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions index 2e4c64c4..0c2ffb94 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions @@ -88,13 +88,19 @@ MODE="$(echo $video|cut -f2 -d:)" case "$DRIVER" in # Cambiar resolución para driver "uvesafb". uvesafb) - grep ":$(echo $MODE|cut -f1 -d-)p" /sys/class/graphics/fb0/modes | head -1 > /sys/class/graphics/fb0/mode 2>&1 || MODE="640x480-16" - echo "$(echo $MODE|cut -f2 -d-)" > /sys/class/graphics/fb0/bits_per_pixel 2>&1 - echo "Screen mode: $(cat /sys/class/graphics/fb0/mode),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp." - ;; + # Mantener resolución por defecto si solo hay una opción disponible. + if [ $(awk 'END {print NR}' /sys/class/graphics/fb0/modes) -eq 1 ]; then + echo "Default screen mode: $(awk -F"[:-]" '{print $2}' /sys/class/graphics/fb0/modes),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp." + else + # Cambiar resolución según valor del parámetro "video". + grep ":$(echo $MODE|cut -f1 -d-)p" /sys/class/graphics/fb0/modes | head -1 > /sys/class/graphics/fb0/mode 2>&1 || MODE="640x480-16" + echo "$(echo $MODE|cut -f2 -d-)" > /sys/class/graphics/fb0/bits_per_pixel 2>&1 + echo "Screen mode: $(cat /sys/class/graphics/fb0/mode),$(cat /sys/class/graphics/fb0/bits_per_pixel)bpp." + fi + ;; # Resolución por defecto para el resto de casos. *) echo "Unknown video driver, using default mode." - ;; + ;; esac } |