Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 25208 Details for
Bug 40562
Convenience wrapper for lilo-22.5.8
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
dolilo genkernel+bootsplash
dolilo (text/plain), 4.42 KB, created by
Tony Vroon (RETIRED)
on 2004-02-08 12:42:12 UTC
(
hide
)
Description:
dolilo genkernel+bootsplash
Filename:
MIME Type:
Creator:
Tony Vroon (RETIRED)
Created:
2004-02-08 12:42:12 UTC
Size:
4.42 KB
patch
obsolete
>#!/bin/bash > ># Copyright 1999-2004 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >rootdev="$(mount | grep "on / " | cut -f1 -d " ")" >bootdev="$(echo ${rootdev} | sed "s:\(.*\).$:\1:")" >fstabstate="$(cat /etc/fstab | awk '!/^#|^[[:blank:]]+#|^\/dev\/BOOT/ {print $2}' | egrep "^/boot$" )" >procstate="$(cat /proc/mounts | awk '{print $2}' | egrep "^/boot$" )" >proc_ro="$(cat /proc/mounts | awk '{ print $2, $4 }' | sed -n '/\/boot/{ /[ ,]\?ro[ ,]\?/p }' )" >KV="$(uname -r)" >ARCH="$(uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ > -e s/arm.*/arm/ -e s/sa110/arm/ \ > -e s/s390x/s390/ -e s/parisc64/parisc/ )" > ># Get /boot mounted and usable >if [ -n "${fstabstate}" ] && [ -n "${procstate}" ]; then > if [ -n "${proc_ro}" ]; then > mount -o remount,rw /boot &>/dev/null > if [ "$?" -ne 0 ]; then > echo "Your /boot partition is mounted read-only and an attempt to remount failed." > echo "Please fix this manually." > exit 1 > fi > fi >elif [ -n "${fstabstate}" ] && [ -z "${procstate}" ]; then > mount /boot -o rw &>/dev/null > if [ "$?" -eq 0 ]; then > unmount="1" > else > echo "You have a separate /boot partition, but it can't be automounted as read/write." > echo "Please do this manually." > exit 2 > fi >fi > ># Check if a newer kernel is available, if so, move it in place >if [ -e /boot/bzImage ] && [ -e "/usr/src/linux/arch/${ARCH}/boot/bzImage" ]; then > diff /boot/bzImage "/usr/src/linux/arch/${ARCH}/boot/bzImage" &>/dev/null > if [ "$?" -ne 0 ]; then > mv /boot/bzImage /boot/bzImage.old > cp "/usr/src/linux/arch/${ARCH}/boot/bzImage" /boot/bzImage > echo "New kernel image moved in place as /boot/bzImage, backup copy made." > fi >elif [ ! -e /boot/bzImage ] && [ -e "/usr/src/linux/arch/${ARCH}/boot/bzImage" ]; then > cp "/usr/src/linux/arch/${ARCH}/boot/bzImage" /boot/bzImage > echo "Kernel image moved into place as /boot/bzImage." >fi > ># See if a genkernel initrd exists for the current kernel sources, if newer, copy it to /boot/initrd >if [ -e "/boot/initrd-${KV}" ]; then > diff "/boot/initrd-${KV}" /boot/initrd &>/dev/null > if [ "$?" -ne 0 ]; then > cp "/boot/initrd-${KV}" /boot/initrd > echo "New genkernel initrd detected, copied to /boot/initrd." > fi >elif [ -e /sbin/fbresolution ] && [ ! -e /boot/initrd ]; then > RES=`/sbin/fbresolution` > if [ -e "/usr/share/bootsplash/initrd-${RES}" ]; then > cp "/usr/share/bootsplash/initrd-${RES}" /boot/initrd > echo "Bootsplash initrd for ${RES} resolution copied to /boot/initrd." > fi >fi > ># Check if lilo configuration is valid, write a minimal config out if not >if [ -e "${rootdev}" ] && [ -e "${bootdev}" ] && [ -e /boot/bzImage ] && [ ! -e /etc/lilo.conf ]; then > echo "boot=${bootdev}" > /etc/lilo.conf > echo "timeout=30" >> /etc/lilo.conf > echo "default=linux" >> /etc/lilo.conf > > # We only need to have lilo prompt if there are two choices in our minimalist config > if [ -e /boot/bzImage.old ]; then > echo "prompt" >> /etc/lilo.conf > fi > > echo >> /etc/lilo.conf > echo "image=/boot/bzImage" >> /etc/lilo.conf > echo " label=linux" >> /etc/lilo.conf > echo " read-only" >> /etc/lilo.conf > echo " root=${rootdev}" >> /etc/lilo.conf > > # See if there is an initrd present, if so, add it to the config > if [ -e /boot/initrd ]; then > echo " initrd=/boot/initrd" >> /etc/lilo.conf > fi > > echo >> /etc/lilo.conf > if [ -e /boot/bzImage.old ]; then > echo "image=/boot/bzImage.old" >> /etc/lilo.conf > echo " label=linuxOLD" >> /etc/lilo.conf > echo " read-only" >> /etc/lilo.conf > echo " root=${rootdev}" >> /etc/lilo.conf > echo >> /etc/lilo.conf > fi > > echo "A minimal /etc/lilo.conf has been generated for you as you didn't have one yet." > >elif [ ! -e /etc/lilo.conf ]; then > echo "You don't have /etc/lilo.conf and it can't be autogenerated for you." > echo "Please make an /etc/lilo.conf file and rerun dolilo." > exit 5 >fi > ># Run lilo >/sbin/lilo $@ > ># Restore original situation for /boot >if [ -n "${proc_ro}" ]; then > mount -o remount,ro /boot &>/dev/null > if [ "$?" -ne 0 ]; then > echo "Your /boot partition was remounted read/write for lilo, but can't be remounted read-only." > echo "Please do this manually." > exit 3 > fi >fi >if [ -n "${unmount}" ]; then > umount /boot > if [ "$?" -ne 0 ]; then > echo "Your /boot partition was automounted for lilo, but can't be unmounted." > echo "Please do this manually." > exit 4 > fi >fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 40562
:
25058
|
25059
|
25060
|
25061
|
25062
|
25063
|
25114
|
25194
|
25208
|
25228
|
25271
|
25802
|
26162
|
27948
|
28070
|
28074
|
28079
|
28688
|
29258
|
30024
|
30026
|
31187
|
31188