source: lliurex-up/trunk/fuentes/scripts/common/update-grub-cfg @ 2609

Last change on this file since 2609 was 2609, checked in by kbut, 3 years ago

refactoring

File size: 919 bytes
Line 
1#!/bin/sh
2# Installing packages (doing the real dist-upgrade)
3
4# gettext domain
5TEXTDOMAIN="lliurex-up"
6export TEXTDOMAIN
7
8COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh"
9if [  -r $COMMON_LIBRARY  ] ; then 
10        . $COMMON_LIBRARY
11fi
12
13# Configuration file for GRUB
14TIME_GRUB_CFG_FILE="/etc/grub.d/00_header"
15
16#gettext messages
17INFO_MESSAGE="$(gettext "Fix waiting time on grub")"
18
19# Methods
20
21_fix_waiting_time()
22{
23        echo "Fixing waiting time on grub configuration"
24        # Test if file exists
25        if [ -f ${TIME_GRUB_CFG_FILE} ]; then
26                echo " * [LliureX Up] Changed file: ${TIME_GRUB_CFG_FILE}"
27                sed -e "s%gfxterm\=0%gfxterm\=1%g" -i "${TIME_GRUB_CFG_FILE}"
28        fi
29       
30}
31
32_info()
33{
34        echo "$INFO_MESSAGE"
35}
36
37_migrate()
38{
39        _fix_waiting_time
40               
41}
42
43_usage()
44{
45        echo "# Unknown argument"
46
47}
48
49_die()
50{
51        echo "Error: $1"
52        exit 1
53}
54
55ACTION="$1"
56case "$ACTION" in
57        migrate)
58                _migrate
59        ;;
60        info)
61                _info
62        ;;
63        *)
64                _usage
65        ;;
66esac
67
Note: See TracBrowser for help on using the repository browser.