Changeset 547


Ignore:
Timestamp:
Feb 10, 2016, 2:55:38 PM (3 years ago)
Author:
mabarracus
Message:

wip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-grub-custom/trunk/fuentes/debian/lliurex-grub-custom.postinst

    r543 r547  
    1010TOKEN_GRUB_IFACES="lliurex-grub-ifaces"
    1111LLIUREX_GRUB_DEFAULT="/etc/lliurex-grub/grub.default"
     12DISTRIBUTION="Lliurex Xenial"
     13GRUB_DEFCFG_DIR="/etc/default/grub.d/"
     14GRUB_DEFCFG_FILE="${GRUB_DEFCFG_DIR}/lliurex_conf.cfg"
    1215
    1316mkdir -p ${LLIUREX_GRUB_TOKENS_DIR}
    1417
    1518if [ -f /etc/default/grub ]; then
     19        if [ ! -d $GRUB_DEFCFG_DIR ]; then
     20            mkdir GRUB_DEFCFG_DIR
     21        fi
    1622        cp /etc/default/grub ${LLIUREX_GRUB_DEFAULT}
    1723        echo " [ LLiureX Grub Custom ] : Settings for LliureX Grub"
     
    1925        if [ ! -f ${LLIUREX_GRUB_TOKENS_DIR}/${TOKEN_DISTRIBUTOR} ] ; then
    2026                echo " [ LLiureX Grub Custom ] : Setting DISTRIBUTION"
    21                 sed -i "s%^GRUB_DISTRIBUTOR=.*%GRUB_DISTRIBUTOR=\"LliureX Xenial\"%g"  ${LLIUREX_GRUB_DEFAULT} || echo "Not find the line"
     27                sed -i "s%^GRUB_DISTRIBUTOR=.*%GRUB_DISTRIBUTOR=\"${DISTRIBUTION}\"%g"  ${LLIUREX_GRUB_DEFAULT} || echo "Not find the line"
     28                echo "GRUB_DISTRIBUTOR=\"${DISTRIBUTION}\"" > ${GRUB_DEFCFG_FILE}
    2229                date +%F_%R > ${LLIUREX_GRUB_TOKENS_DIR}/${TOKEN_DISTRIBUTOR}
    2330        fi
     
    2734                echo " [ LLiureX Grub Custom ] : Setting GFXMODE"
    2835                sed -i "s%^#GRUB_GFXMODE=.*%GRUB_GFXMODE=1024x768%g"  ${LLIUREX_GRUB_DEFAULT}  || echo "Not find the line"
     36                echo "GRUB_GFXMODE=1024x768" > ${GRUB_DEFCFG_FILE}
    2937                date +%F_%R > ${LLIUREX_GRUB_TOKENS_DIR}/${TOKEN_GFXMODE}
    3038        fi
     
    3543                echo " [ LLiureX Grub Custom ] : Setting HIDDENT_TIMEOUT"
    3644                sed -i "s%^GRUB_HIDDEN_TIMEOUT_QUIET=true%#GRUB_HIDDEN_TIMEOUT_QUIET=true%g"  ${LLIUREX_GRUB_DEFAULT} || echo "Not find the line"
     45                echo "GRUB_HIDDEN_TIMEOUT_QUIET=true" > ${GRUB_DEFCFG_FILE}
    3746                date +%F_%R > ${LLIUREX_GRUB_TOKENS_DIR}/${TOKEN_GRUB_HIDDEN_TIMEOUT}
    3847        fi
     
    4352                echo " [ LLiureX Grub Custom ] : Setting HIDDENT_TIMEOUT"
    4453                sed -i "s%^GRUB_HIDDEN_TIMEOUT=.*%GRUB_HIDDEN_TIMEOUT=%g"  ${LLIUREX_GRUB_DEFAULT} || echo "Not find the line"
     54                echo "GRUB_HIDDEN_TIMEOUT=" > ${GRUB_DEFCFG_FILE}
    4555                date +%F_%R > ${LLIUREX_GRUB_TOKENS_DIR}/${TOKEN_GRUB_HIDDEN_TIMEOUT_2}
    4656        fi
     
    5161                echo " [ LLiureX Grub Custom ] : Setting GRUB_BACKGROUND"
    5262                echo 'GRUB_BACKGROUND="/usr/share/lliurex-grub-custom/backgrounds/trusty.png"' >> ${LLIUREX_GRUB_DEFAULT}
     63                echo "GRUB_BACKGROUND=\"/usr/share/lliurex-grub-custom/backgrounds/trusty.png\"" > ${GRUB_DEFCFG_FILE}
    5364                date +%F_%R > ${LLIUREX_GRUB_TOKENS_DIR}/${TOKEN_GRUB_BACKGROUND}
    5465        fi
     
    6677                echo " [ LLiureX Grub Custom ] : Setting default Linux cmdline"
    6778                sed -i "s%^GRUB_CMDLINE_LINUX_DEFAULT=.*%GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 quiet splash rw\"%g" ${LLIUREX_GRUB_DEFAULT} || echo "Not find the line"
     79                echo "GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 quiet splash rw\"" > ${GRUB_DEFCFG_FILE}
    6880                IFACES=`ls /sys/class/net|egrep -v '^lo$'`
    6981                I=0
Note: See TracChangeset for help on using the changeset viewer.