Magellan Linux

Contents of /trunk/grubby/patches/grubby-8.9-os-release-support.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1679 - (show annotations) (download)
Sat Mar 3 15:50:14 2012 UTC (12 years, 2 months ago) by niro
File size: 2063 byte(s)
-fixed patch
1 Index: grubby/new-kernel-pkg
2 ===================================================================
3 --- grubby/new-kernel-pkg (Revision 1771)
4 +++ grubby/new-kernel-pkg (Arbeitskopie)
5 @@ -25,6 +25,32 @@
6 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7 #
8
9 +read_os_release()
10 +{
11 + local NAME
12 + local ID
13 + local Version
14 + local Version_ID
15 + local PRETTY_NAME
16 + local ANSI_COLOR
17 + local CPE_NAME
18 +
19 + if [[ -f /etc/os-release ]]
20 + then
21 + source /etc/os-release
22 +
23 + case $1 in
24 + name) echo "${NAME}" ;;
25 + id) echo "${ID}" ;;
26 + version) echo "${Version}" ;;
27 + version_id) echo "${Version_ID}" ;;
28 + pretty_name) echo "${PRETTY_NAME}" ;;
29 + ansi_color) echo "${ANSI_COLOR}" ;;
30 + cpe_name) echo "${CPE_NAME}" ;;
31 + esac
32 + fi
33 +}
34 +
35 PATH=/sbin:/bin:$PATH
36
37 lilo=/sbin/lilo
38 @@ -202,6 +228,9 @@
39 elif [ -f /etc/mageversion ]
40 then
41 title="Magellan Linux $(< /etc/mageversion) [ ${version} ]"
42 + elif [[ $(read_os_release id) = magellan ]]
43 + then
44 + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]"
45 else
46 title="Magellan Linux [ ${version} ]"
47 fi
48 @@ -223,6 +252,9 @@
49 elif [ -f /etc/mageversion ]
50 then
51 title="Magellan Linux $(< /etc/mageversion) [ ${version} ]"
52 + elif [[ $(read_os_release id) = magellan ]]
53 + then
54 + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]"
55 else
56 title="Magellan Linux [ ${version} ]"
57 fi
58 @@ -245,6 +277,9 @@
59 elif [ -f /etc/mageversion ]
60 then
61 title="Magellan Linux $(< /etc/mageversion) [ ${version} ]"
62 + elif [[ $(read_os_release id) = magellan ]]
63 + then
64 + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]"
65 else
66 title="Magellan Linux [ ${version} ]"
67 fi
68 @@ -292,6 +327,9 @@
69 elif [ -f /etc/mageversion ]
70 then
71 title="Magellan Linux $(< /etc/mageversion) [ ${version} ]"
72 + elif [[ $(read_os_release id) = magellan ]]
73 + then
74 + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]"
75 else
76 title="Magellan Linux [ ${version} ]"
77 fi