lilo: Don't autogenerate a configuration file
This commit is contained in:
parent
138dd5d607
commit
80a5ebbdb9
|
@ -4,32 +4,12 @@
|
|||
#
|
||||
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||
#
|
||||
PKGNAME="${1}"
|
||||
VERSION="${2}"
|
||||
|
||||
boot="${ROOTDIR}/boot"
|
||||
etc="${ROOTDIR}/etc"
|
||||
entries="${etc}/lilo.d"
|
||||
name="void-${VERSION}"
|
||||
entry="${entries}/${name}.conf"
|
||||
[ -x "$(command -v lilo)" ] || \
|
||||
return 0
|
||||
|
||||
[ -d "${boot}" ] && [ -d "${etc}" ] || exit 0
|
||||
mkdir -p "${entries}"
|
||||
|
||||
cat <<-EOF > "${entry}"
|
||||
image = /${boot}/vmlinuz-${VERSION}
|
||||
label = "${name}"
|
||||
initrd = /${boot}/initramfs-${VERSION}.img
|
||||
EOF
|
||||
|
||||
# Replace existing default entry with this one
|
||||
echo "default=${name}" > "${entries}/default.conf"
|
||||
|
||||
conf="$(mktemp)"
|
||||
cat "${etc}/lilo.conf" "${entries}"/*.conf > "${conf}"
|
||||
|
||||
[ -x "$(command -v lilo)" ] && \
|
||||
lilo -C "${conf}"
|
||||
|
||||
# Remove temporary config file
|
||||
rm -f "${conf}"
|
||||
if [ -e /etc/lilo.conf ]; then
|
||||
lilo
|
||||
elif [ ! -e /etc/lilo.conf ]; then
|
||||
echo "Warning: Not updating LILO. Configuration file wasn't found." 1>&2
|
||||
fi
|
||||
|
|
|
@ -4,26 +4,9 @@
|
|||
#
|
||||
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||
#
|
||||
PKGNAME="${1}"
|
||||
VERSION="${2}"
|
||||
|
||||
boot="${ROOTDIR}/boot"
|
||||
etc="${ROOTDIR}/etc"
|
||||
entries="${etc}/lilo.d"
|
||||
name="void-${VERSION}"
|
||||
entry="${entries}/${name}.conf"
|
||||
[ -x "$(command -v lilo)" ] || \
|
||||
return 0
|
||||
|
||||
[ -d "${boot}" ] && [ -d "${etc}" ] || exit 0
|
||||
rm -f "${entry}"
|
||||
|
||||
# No default entry if the removed one was the default
|
||||
sed "/^default=${name}\$/d" -i "${entries}/default.conf"
|
||||
|
||||
conf="$(mktemp)"
|
||||
cat "${etc}/lilo.conf" "${entries}"/*.conf > "${conf}"
|
||||
|
||||
[ -x "$(command -v lilo)" ] && \
|
||||
lilo -C "${conf}"
|
||||
|
||||
# Remove temporary config file
|
||||
rm -f "${conf}"
|
||||
# Do not abort in case of an error.
|
||||
lilo || true
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
# Example lilo(8) configuration.
|
||||
# See lilo.conf(5) for more information.
|
||||
|
||||
# Additional kernel parameter.
|
||||
append="quiet"
|
||||
|
||||
# Specifies the boot device.
|
||||
boot="/dev/sda"
|
||||
|
||||
# Devices which should be mounted as root.
|
||||
root="/dev/sda2"
|
||||
|
||||
# Enables map compaction.
|
||||
compact
|
||||
|
||||
# Prompt to start one certain kernel from the displayed menu.
|
||||
prompt
|
||||
|
||||
# Time to wait before booting the default kernel.
|
||||
timeout=100
|
||||
|
||||
# Allow use of partitions above 1024 cylinders.
|
||||
lba32
|
||||
|
||||
# Mount the root file system read-only.
|
||||
read-only
|
||||
|
||||
# Images are configured in /etc/lilo.d/*.conf
|
||||
# End of file
|
|
@ -1,11 +1,10 @@
|
|||
# Template file for 'lilo'
|
||||
pkgname=lilo
|
||||
version=24.1
|
||||
revision=3
|
||||
revision=4
|
||||
only_for_archs="i686 x86_64"
|
||||
hostmakedepends="bin86"
|
||||
makedepends="device-mapper-devel"
|
||||
make_dirs="/etc/lilo.d 0755 root root"
|
||||
conf_files="/etc/lilo.conf"
|
||||
short_desc="Standard Linux boot loader"
|
||||
maintainer="Sören Tempel <soeren+void@soeren-tempel.net>"
|
||||
|
@ -31,9 +30,10 @@ do_install() {
|
|||
make DESTDIR=${DESTDIR} install
|
||||
mv ${DESTDIR}/sbin/* ${DESTDIR}/usr/sbin
|
||||
|
||||
# Setup config files
|
||||
rm ${DESTDIR}/etc/lilo.conf_example
|
||||
vinstall ${FILESDIR}/lilo.conf 600 etc
|
||||
for file in sample/*.conf; do
|
||||
vsconf ${file}
|
||||
done
|
||||
|
||||
# Setup kernel hooks
|
||||
rm -rf ${DESTDIR}/etc/initramfs ${DESTDIR}/etc/kernel
|
||||
|
|
Loading…
Reference in New Issue