Annotation of /trunk/grubby/patches/grubby-8.9-os-release-support.patch
Parent Directory | Revision Log
Revision 1679 -
(hide annotations)
(download)
Sat Mar 3 15:50:14 2012 UTC (12 years, 6 months ago) by niro
File size: 2063 byte(s)
Sat Mar 3 15:50:14 2012 UTC (12 years, 6 months ago) by niro
File size: 2063 byte(s)
-fixed patch
1 | niro | 1678 | 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 | niro | 1679 | + ansi_color) echo "${ANSI_COLOR}" ;; |
30 | niro | 1678 | + 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 | niro | 1679 | + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
45 | niro | 1678 | 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 | niro | 1679 | + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
55 | niro | 1678 | 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 | niro | 1679 | + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
65 | niro | 1678 | 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 | niro | 1679 | + title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
75 | niro | 1678 | else |
76 | title="Magellan Linux [ ${version} ]" | ||
77 | fi |