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 |
68 |
[ -f /etc/conf.d/grubby ] && . /etc/conf.d/grubby |
[ -f /etc/conf.d/grubby ] && . /etc/conf.d/grubby |
69 |
[ -f /etc/conf.d/grubby-uboot ] && . /etc/conf.d/grubby-uboot |
[ -f /etc/conf.d/grubby-uboot ] && . /etc/conf.d/grubby-uboot |
70 |
|
|
71 |
|
cfgGrub2="" |
72 |
|
cfgGrub2Efi="" |
73 |
cfgGrub="" |
cfgGrub="" |
74 |
cfgLilo="" |
cfgLilo="" |
75 |
|
cfgExtlinux="" |
76 |
cfguBoot="" |
cfguBoot="" |
77 |
runLilo="" |
runLilo="" |
78 |
grubConfig="" |
grubConfig="" |
79 |
|
grub2Config="" |
80 |
|
grub2EfiConfig="" |
81 |
|
extlinuxConfig="" |
82 |
|
|
83 |
ARCH=$(uname -m) |
ARCH=$(uname -m) |
84 |
|
|
111 |
lilo=/sbin/zipl |
lilo=/sbin/zipl |
112 |
runLilo="yes" |
runLilo="yes" |
113 |
isx86="" |
isx86="" |
114 |
elif [[ ${ARCH} = armv7l ]] |
elif [[ ${ARCH} = armv7l ]] || [[ ${ARCH} = armv7hl ]] || [[ ${ARCH} = armv5tel ]] |
115 |
then |
then |
116 |
|
machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//') |
117 |
liloConfig="" |
liloConfig="" |
118 |
bootPrefix=/boot |
bootPrefix=/boot |
119 |
ubootDir=${UBOOT_DIR:-"/boot/uboot"} |
ubootDir=${UBOOT_DIR:-"/boot/uboot"} |
125 |
mounted="" |
mounted="" |
126 |
liloFlag="" |
liloFlag="" |
127 |
isx86="" |
isx86="" |
128 |
|
if [[ ${machine} == "OMAP3 Beagle Board" ]] || [[ ${machine} == "OMAP4 Panda board" ]] |
129 |
|
then |
130 |
|
ubootAddress=0x80008000 |
131 |
|
else |
132 |
|
ubootAddress=0x00008000 |
133 |
|
fi |
134 |
else |
else |
135 |
# this leaves i?86 and x86_64 |
# this leaves i?86 and x86_64 |
136 |
liloConfig=/etc/lilo.conf |
liloConfig=/etc/lilo.conf |
137 |
grubConfig=/boot/grub/grub.conf |
grubConfig=/boot/grub/grub.conf |
138 |
|
grub2Config=/boot/grub/grub.cfg |
139 |
|
grub2EfiConfig=/boot/grub/grub-efi.cfg |
140 |
|
extlinuxConfig=/boot/extlinux/extlinux.conf |
141 |
bootPrefix=/boot |
bootPrefix=/boot |
142 |
liloFlag=lilo |
liloFlag=lilo |
143 |
isx86="yes" |
isx86="yes" |
153 |
verbose="" |
verbose="" |
154 |
makedefault="" |
makedefault="" |
155 |
package="" |
package="" |
156 |
mbkernel="" |
mbkernel="${HYPERVISOR}" |
157 |
mbargs="" |
mbargs="${HYPERVISOR_ARGS}" |
158 |
adddracutargs="" |
adddracutargs="" |
159 |
addplymouthinitrd="" |
addplymouthinitrd="" |
160 |
|
|
172 |
exit 1 |
exit 1 |
173 |
} |
} |
174 |
|
|
|
run_grub2() |
|
|
{ |
|
|
if [ -d /boot/grub -a -x /sbin/grub-mkconfig ] |
|
|
then |
|
|
cp /boot/grub/grub.cfg /boot/grub/grub.cfg.old |
|
|
/sbin/grub-mkconfig -o /boot/grub/grub.cfg |
|
|
fi |
|
|
} |
|
|
|
|
175 |
install() |
install() |
176 |
{ |
{ |
177 |
# XXX kernel should be able to be specified also (or work right on ia64) |
# XXX kernel should be able to be specified also (or work right on ia64) |
209 |
return |
return |
210 |
fi |
fi |
211 |
|
|
|
# Run grub2's configuration update in parallel, if it is installed |
|
|
run_grub2 |
|
|
|
|
212 |
# get the root filesystem to use |
# get the root filesystem to use |
213 |
rootdevice=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/fstab) |
rootdevice=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/fstab) |
214 |
|
|
224 |
|
|
225 |
if [[ -n ${banner} ]] |
if [[ -n ${banner} ]] |
226 |
then |
then |
227 |
title="${banner} (${version})" |
title="${banner} [ ${version} ]" |
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 |
237 |
${grubby} --add-kernel=${bootPrefix}/${kernelName}-${version} \ |
${grubby} --grub -c ${grubConfig} \ |
238 |
|
--add-kernel=${bootPrefix}/${kernelName}-${version} \ |
239 |
${INITRD} --copy-default ${makedefault} --title "${title}" \ |
${INITRD} --copy-default ${makedefault} --title "${title}" \ |
240 |
${mbkernel:+--add-multiboot="${mbkernel}"} ${mbargs:+--mbargs="${mbargs}"} \ |
${mbkernel:+--add-multiboot="${mbkernel}"} ${mbargs:+--mbargs="${mbargs}"} \ |
241 |
--args="root=${rootdevice} ${kernargs}" --remove-kernel="TITLE=${title}" |
--args="root=${rootdevice} ${kernargs}" --remove-kernel="TITLE=${title}" |
242 |
else |
else |
243 |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby for grub 0.97" |
244 |
|
fi |
245 |
|
if [[ -n ${cfgGrub2} ]] |
246 |
|
then |
247 |
|
[[ -n ${verbose} ]] && echo "adding ${version} to ${grub2Config}" |
248 |
|
|
249 |
|
if [[ -n ${banner} ]] |
250 |
|
then |
251 |
|
title="${banner} [ ${version} ]" |
252 |
|
elif [ -f /etc/mageversion ] |
253 |
|
then |
254 |
|
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 |
259 |
|
title="Magellan Linux [ ${version} ]" |
260 |
|
fi |
261 |
|
${grubby} --grub2 -c ${grub2Config} \ |
262 |
|
--add-kernel=${bootPrefix}/${kernelName}-${version} \ |
263 |
|
${INITRD} --copy-default ${makedefault} --title "${title}" \ |
264 |
|
${mbkernel:+--add-multiboot="${mbkernel}"} \ |
265 |
|
${mbargs:+--mbargs="${mbargs}"} \ |
266 |
|
--args="root=${rootdevice} ${kernargs}" --remove-kernel="TITLE=${title}" |
267 |
|
else |
268 |
|
[[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby for grub 2" |
269 |
|
fi |
270 |
|
if [[ -n ${cfgGrub2Efi} ]] |
271 |
|
then |
272 |
|
[[ -n ${verbose} ]] && echo "adding ${version} to ${grub2EfiConfig}" |
273 |
|
|
274 |
|
if [[ -n ${banner} ]] |
275 |
|
then |
276 |
|
title="${banner} [ ${version} ]" |
277 |
|
elif [ -f /etc/mageversion ] |
278 |
|
then |
279 |
|
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 |
284 |
|
title="Magellan Linux [ ${version} ]" |
285 |
|
fi |
286 |
|
${grubby} --grub2 -c ${grub2EfiConfig} \ |
287 |
|
--add-kernel=${bootPrefix}/${kernelName}-${version} \ |
288 |
|
${INITRD} --copy-default ${makedefault} --title "${title}" \ |
289 |
|
${mbkernel:+--add-multiboot="${mbkernel}"} \ |
290 |
|
${mbargs:+--mbargs="${mbargs}"} \ |
291 |
|
--args="root=${rootdevice} ${kernargs}" --remove-kernel="TITLE=${title}" |
292 |
|
else |
293 |
|
[[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby for grub 2 with UEFI" |
294 |
fi |
fi |
295 |
|
|
296 |
if [[ -n ${cfgLilo} ]] |
if [[ -n ${cfgLilo} ]] |
316 |
else |
else |
317 |
[[ -n ${verbose} ]] && echo "${liloConfig} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${liloConfig} does not exist, not running grubby" |
318 |
fi |
fi |
319 |
|
|
320 |
|
if [[ -n ${cfgExtlinux} ]] |
321 |
|
then |
322 |
|
[[ -n ${verbose} ]] && echo "adding ${version} to ${extlinuxConfig}" |
323 |
|
|
324 |
|
if [[ -n ${banner} ]] |
325 |
|
then |
326 |
|
title="${banner} [ ${version} ]" |
327 |
|
elif [ -f /etc/mageversion ] |
328 |
|
then |
329 |
|
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 |
334 |
|
title="Magellan Linux [ ${version} ]" |
335 |
|
fi |
336 |
|
${grubby} --extlinux -c ${extlinuxConfig} \ |
337 |
|
--add-kernel=${bootPrefix}/${kernelName}-${version} \ |
338 |
|
${INITRD} --copy-default ${makedefault} --title "${title}" \ |
339 |
|
${mbkernel:+--add-multiboot="${mbkernel}"} ${mbargs:+--mbargs="${mbargs}"} \ |
340 |
|
--args="root=${rootdevice} ${kernargs}" --remove-kernel="TITLE=${title}" |
341 |
|
else |
342 |
|
[[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux" |
343 |
|
fi |
344 |
} |
} |
345 |
|
|
346 |
remove() |
remove() |
353 |
return |
return |
354 |
fi |
fi |
355 |
|
|
|
# Run grub2's configuration update in parallel, if it is installed |
|
|
run_grub2 |
|
|
|
|
356 |
if [[ -n ${cfgGrub} ]] |
if [[ -n ${cfgGrub} ]] |
357 |
then |
then |
358 |
[[ -n ${verbose} ]] && echo "removing ${version} from ${grubConfig}" |
[[ -n ${verbose} ]] && echo "removing ${version} from ${grubConfig}" |
359 |
${grubby} --remove-kernel=${bootPrefix}/${kernelName}-${version} |
${grubby} --grub -c ${grubConfig} \ |
360 |
|
--remove-kernel=${bootPrefix}/${kernelName}-${version} |
361 |
else |
else |
362 |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby for grub 0.97" |
363 |
|
fi |
364 |
|
if [[ -n ${cfgGrub2} ]] |
365 |
|
then |
366 |
|
[[ -n ${verbose} ]] && echo "removing ${version} from ${grub2Config}" |
367 |
|
${grubby} --grub2 -c ${grub2Config} \ |
368 |
|
--remove-kernel=${bootPrefix}/${kernelName}-${version} |
369 |
|
else |
370 |
|
[[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby for grub 2" |
371 |
|
fi |
372 |
|
if [[ -n ${cfgGrub2Efi} ]] |
373 |
|
then |
374 |
|
[[ -n ${verbose} ]] && echo "removing ${version} from ${grub2EfiConfig}" |
375 |
|
${grubby} --grub2 -c ${grub2EfiConfig} \ |
376 |
|
--remove-kernel=${bootPrefix}/${kernelName}-${version} |
377 |
|
else |
378 |
|
[[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby grub 2 with UEFI" |
379 |
fi |
fi |
380 |
|
|
381 |
if [[ -n ${cfgLilo} ]] |
if [[ -n ${cfgLilo} ]] |
445 |
[ -f ${tmpKList} ] && rm -f ${tmpKList} |
[ -f ${tmpKList} ] && rm -f ${tmpKList} |
446 |
fi |
fi |
447 |
else |
else |
448 |
[[ -n ${verbose} ]] && echo "No previous kernel version. uBoot images not removed!" |
[[ -n ${verbose} ]] && echo "No previous kernel version. U-Boot images not removed!" |
449 |
fi |
fi |
450 |
else |
else |
451 |
[[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not modifying ${ubootDir}" |
[[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not modifying ${ubootDir}" |
452 |
fi |
fi |
453 |
|
|
454 |
|
if [[ -n ${cfgExtlinux} ]] |
455 |
|
then |
456 |
|
[[ -n ${verbose} ]] && echo "removing ${version} from ${extlinuxConfig}" |
457 |
|
${grubby} --extlinux -c ${extlinuxConfig} \ |
458 |
|
--remove-kernel=${bootPrefix}/${kernelName}-${version} |
459 |
|
else |
460 |
|
[[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux" |
461 |
|
fi |
462 |
} |
} |
463 |
|
|
464 |
update() |
update() |
481 |
fi |
fi |
482 |
fi |
fi |
483 |
|
|
|
# Run grub2's configuration update in parallel, if it is installed |
|
|
run_grub2 |
|
|
|
|
484 |
if [[ -n ${cfgGrub} ]] |
if [[ -n ${cfgGrub} ]] |
485 |
then |
then |
486 |
[[ -n ${verbose} ]] && echo "updating ${version} from ${grubConfig}" |
[[ -n ${verbose} ]] && echo "updating ${version} from ${grubConfig}" |
487 |
${grubby} --update-kernel=${bootPrefix}/${kernelName}-${version} \ |
${grubby} --grub -c ${grubConfig} \ |
488 |
|
--update-kernel=${bootPrefix}/${kernelName}-${version} \ |
489 |
${INITRD} \ |
${INITRD} \ |
490 |
${kernargs:+--args="${kernargs}"} \ |
${kernargs:+--args="${kernargs}"} \ |
491 |
${removeargs:+--remove-args="${removeargs}"} |
${removeargs:+--remove-args="${removeargs}"} |
493 |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby" |
[[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby" |
494 |
fi |
fi |
495 |
|
|
496 |
|
if [[ -n ${cfgGrub2} ]] |
497 |
|
then |
498 |
|
[[ -n ${verbose} ]] && echo "updating ${version} from ${grub2Config}" |
499 |
|
${grubby} --grub2 -c ${grub2Config} \ |
500 |
|
--update-kernel=${bootPrefix}/${kernelName}-${version} \ |
501 |
|
${INITRD} \ |
502 |
|
${kernargs:+--args="${kernargs}"} \ |
503 |
|
${removeargs:+--remove-args="${removeargs}"} |
504 |
|
else |
505 |
|
[[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby" |
506 |
|
fi |
507 |
|
|
508 |
|
if [[ -n ${cfgGrub2Efi} ]] |
509 |
|
then |
510 |
|
[[ -n ${verbose} ]] && echo "updating ${version} from ${grub2EfiConfig}" |
511 |
|
${grubby} --grub2 -c ${grub2EfiConfig} \ |
512 |
|
--update-kernel=${bootPrefix}/${kernelName}-${version} \ |
513 |
|
${INITRD} \ |
514 |
|
${kernargs:+--args="${kernargs}"} \ |
515 |
|
${removeargs:+--remove-args="${removeargs}"} |
516 |
|
else |
517 |
|
[[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby" |
518 |
|
fi |
519 |
|
|
520 |
if [[ -n ${cfgLilo} ]] |
if [[ -n ${cfgLilo} ]] |
521 |
then |
then |
522 |
[[ -n ${verbose} ]] && echo "updating ${version} from ${liloConfig}" |
[[ -n ${verbose} ]] && echo "updating ${version} from ${liloConfig}" |
545 |
[[ -n ${verbose} ]] && echo "adding $version to ${ubootDir}..." |
[[ -n ${verbose} ]] && echo "adding $version to ${ubootDir}..." |
546 |
|
|
547 |
[[ -n ${verbose} ]] && echo "creating uImage-${version}" |
[[ -n ${verbose} ]] && echo "creating uImage-${version}" |
548 |
mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 \ |
mkimage -A arm -O linux -T kernel -C none -a ${ubootAddress} \ |
549 |
-n ${version} -d ${bootPrefix}/${kernelName}-${version} ${ubootDir}/uImage-${version} |
-e ${ubootAddress} -n ${version} \ |
550 |
|
-d ${bootPrefix}/${kernelName}-${version} ${ubootDir}/uImage-${version} |
551 |
|
|
552 |
[[ -n ${verbose} ]] && echo "creating uInitrd-${version}" |
[[ -n ${verbose} ]] && echo "creating uInitrd-${version}" |
553 |
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 \ |
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 \ |
572 |
else |
else |
573 |
[[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not setting up ${ubootDir}" |
[[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not setting up ${ubootDir}" |
574 |
fi |
fi |
575 |
|
|
576 |
|
if [[ -n ${cfgExtlinux} ]] |
577 |
|
then |
578 |
|
[[ -n ${verbose} ]] && echo "updating ${version} from ${extlinuxConfig}" |
579 |
|
${grubby} --extlinux -c ${extlinuxConfig} \ |
580 |
|
--update-kernel=${bootPrefix}/${kernelName}-${version} \ |
581 |
|
${INITRD} \ |
582 |
|
${kernargs:+--args="${kernargs}"} \ |
583 |
|
${removeargs:+--remove-args="${removeargs}"} |
584 |
|
else |
585 |
|
[[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby" |
586 |
|
fi |
587 |
} |
} |
588 |
|
|
589 |
mkinitrd() |
makeinitrd() |
590 |
{ |
{ |
591 |
if [[ -n ${dracut} ]] |
if [[ -n ${dracut} ]] |
592 |
then |
then |
593 |
tool="/sbin/dracut ${dracuthostonly} -f ${initrdfile} ${version}" |
tool="dracut ${dracuthostonly} -f ${initrdfile} ${version}" |
594 |
else |
else |
595 |
tool="/sbin/mkinitrd --allow-missing -f ${initrdfile} ${version}" |
tool="mkinitrd --allow-missing -f ${initrdfile} ${version}" |
596 |
fi |
fi |
597 |
[[ -n ${verbose} ]] && echo "creating initrd ${initrdfile} using ${version}" |
[[ -n ${verbose} ]] && echo "creating initrd ${initrdfile} using ${version}" |
598 |
${tool} |
${tool} |
833 |
|
|
834 |
if [[ ${initrd} = make ]] |
if [[ ${initrd} = make ]] |
835 |
then |
then |
836 |
mkinitrd |
makeinitrd |
837 |
elif [[ ${initrd} = remove ]] |
elif [[ ${initrd} = remove ]] |
838 |
then |
then |
839 |
rminitrd |
rminitrd |
846 |
fi |
fi |
847 |
|
|
848 |
[[ -n ${grubConfig} ]] && [ -f ${grubConfig} ] && cfgGrub=1 |
[[ -n ${grubConfig} ]] && [ -f ${grubConfig} ] && cfgGrub=1 |
849 |
|
[[ -n ${grub2Config} ]] && [ -f ${grub2Config} ] && cfgGrub2=1 |
850 |
|
[[ -n ${grub2EfiConfig} ]] && [ -f ${grub2EfiConfig} ] && cfgGrub2Efi=1 |
851 |
[[ -n ${liloConfig} ]] && [ -f ${liloConfig} ] && cfgLilo=1 |
[[ -n ${liloConfig} ]] && [ -f ${liloConfig} ] && cfgLilo=1 |
852 |
|
[[ -n ${extlinuxConfig} ]] && [ -f ${extlinuxConfig} ] && cfgExtlinux=1 |
853 |
|
|
854 |
# if we have a uBoot directory, check if it is mounted. |
# if we have a U-Boot directory, but no boot script, check if the directory |
855 |
# if not, mount it. Then check if a boot script exists. |
# is mounted. If not, mount it, and then check if a boot script exists. |
856 |
if [[ -n ${ubootDir} ]] |
if [[ -n ${ubootDir} ]] |
857 |
then |
then |
858 |
mountEntry=$(mount | grep ${ubootDir}) |
if [ -f ${ubootScript} ] |
|
if [[ -z ${mountEntry} ]] |
|
859 |
then |
then |
860 |
mount ${ubootDevice} ${ubootDir} |
cfguBoot=1 |
861 |
mounted=1 |
else |
862 |
|
mountEntry=$(mount | grep ${ubootDir}) |
863 |
|
if [[ -z ${mountEntry} ]] |
864 |
|
then |
865 |
|
mount ${ubootDevice} ${ubootDir} |
866 |
|
mounted=1 |
867 |
|
fi |
868 |
|
[ -f ${ubootScript} ] && cfguBoot=1 |
869 |
fi |
fi |
|
[ -f ${ubootScript} ] && cfguBoot=1 |
|
870 |
fi |
fi |
871 |
|
|
872 |
# if we have a lilo config on an x86 box, see if the default boot loader |
# if we have a lilo config on an x86 box, see if the default boot loader |
887 |
update |
update |
888 |
fi |
fi |
889 |
|
|
890 |
|
# if we mounted the U-Boot directory, unmount it. |
891 |
|
[[ -n ${mounted} ]] && umount ${ubootDir} |
892 |
|
|
893 |
exit 0 |
exit 0 |