25 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
26 |
# |
# |
27 |
|
|
28 |
|
read_os_release() |
29 |
|
{ |
30 |
|
local NAME |
31 |
|
local ID |
32 |
|
local Version |
33 |
|
local Version_ID |
34 |
|
local PRETTY_NAME |
35 |
|
local ANSI_COLOR |
36 |
|
local CPE_NAME |
37 |
|
|
38 |
|
if [[ -f /etc/os-release ]] |
39 |
|
then |
40 |
|
source /etc/os-release |
41 |
|
|
42 |
|
case $1 in |
43 |
|
name) echo "${NAME}" ;; |
44 |
|
id) echo "${ID}" ;; |
45 |
|
version) echo "${Version}" ;; |
46 |
|
version_id) echo "${Version_ID}" ;; |
47 |
|
pretty_name) echo "${PRETTY_NAME}" ;; |
48 |
|
ansi_color) echo "${ANSI_COLOR}" ;; |
49 |
|
cpe_name) echo "${CPE_NAME}" ;; |
50 |
|
esac |
51 |
|
fi |
52 |
|
} |
53 |
|
|
54 |
PATH=/sbin:/bin:$PATH |
PATH=/sbin:/bin:$PATH |
55 |
|
|
56 |
lilo=/sbin/lilo |
lilo=/sbin/lilo |
111 |
lilo=/sbin/zipl |
lilo=/sbin/zipl |
112 |
runLilo="yes" |
runLilo="yes" |
113 |
isx86="" |
isx86="" |
114 |
elif [[ ${ARCH} = armv7l ]] || [[ ${ARCH} = armv7hl ]] |
elif [[ ${ARCH} = armv7l ]] || [[ ${ARCH} = armv7hl ]] || [[ ${ARCH} = armv5tel ]] |
115 |
then |
then |
116 |
machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//') |
machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//') |
117 |
liloConfig="" |
liloConfig="" |
228 |
elif [ -f /etc/mageversion ] |
elif [ -f /etc/mageversion ] |
229 |
then |
then |
230 |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
231 |
|
elif [[ $(read_os_release id) = magellan ]] |
232 |
|
then |
233 |
|
title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
234 |
else |
else |
235 |
title="Magellan Linux [ ${version} ]" |
title="Magellan Linux [ ${version} ]" |
236 |
fi |
fi |
252 |
elif [ -f /etc/mageversion ] |
elif [ -f /etc/mageversion ] |
253 |
then |
then |
254 |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
255 |
|
elif [[ $(read_os_release id) = magellan ]] |
256 |
|
then |
257 |
|
title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
258 |
else |
else |
259 |
title="Magellan Linux [ ${version} ]" |
title="Magellan Linux [ ${version} ]" |
260 |
fi |
fi |
277 |
elif [ -f /etc/mageversion ] |
elif [ -f /etc/mageversion ] |
278 |
then |
then |
279 |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
280 |
|
elif [[ $(read_os_release id) = magellan ]] |
281 |
|
then |
282 |
|
title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
283 |
else |
else |
284 |
title="Magellan Linux [ ${version} ]" |
title="Magellan Linux [ ${version} ]" |
285 |
fi |
fi |
327 |
elif [ -f /etc/mageversion ] |
elif [ -f /etc/mageversion ] |
328 |
then |
then |
329 |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
title="Magellan Linux $(< /etc/mageversion) [ ${version} ]" |
330 |
|
elif [[ $(read_os_release id) = magellan ]] |
331 |
|
then |
332 |
|
title="$(read_os_release name) $(read_os_release version_id) [ ${version} ]" |
333 |
else |
else |
334 |
title="Magellan Linux [ ${version} ]" |
title="Magellan Linux [ ${version} ]" |
335 |
fi |
fi |