mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
- mkinitramfs take care of eventual missing depmod run
- do the migration from mkinitramfs in preinst - sed the modules file so that it looks pretty some than ours - polish modules file - allow BUSYBOX=n
This commit is contained in:
parent
af6f5f4752
commit
f82a46fac9
@ -2,8 +2,9 @@
|
||||
#
|
||||
# Syntax: module_name [args ...]
|
||||
#
|
||||
# You must run update-initramfs(8) to effect this change.
|
||||
#
|
||||
# This might be good choices:
|
||||
# Examples:
|
||||
#
|
||||
# raid1
|
||||
# sd_mod
|
||||
|
||||
24
debian/changelog
vendored
24
debian/changelog
vendored
@ -1,9 +1,29 @@
|
||||
initramfs-tools (0.68) unstable; urgency=low
|
||||
initramfs-tools (0.68) unstable; urgency=high
|
||||
|
||||
* script/functions, hook-functions: Move check_minkver() to the second
|
||||
file as it uses dpkg and is run by mkinitramfs and not on boot.
|
||||
|
||||
-- maximilian attems <maks@sternwelten.at> Sun, 2 Jul 2006 19:44:45 +0200
|
||||
* mkinitramfs: Check if ${BUSYBOX} is set to n before adding it.
|
||||
Add a big fat warning that this not yet supported. Helps to do the
|
||||
klibc-utils work.
|
||||
|
||||
* mkinitramfs: Run depmod if no /lib/modules/${version}/modules.dep exists.
|
||||
Solves initramfs creation for handbuild upstream Xen targets.
|
||||
Thanks to Klaus Ita <ita@ai.wu-wien.ac.at> for the report.
|
||||
|
||||
* debian/initramfs-tools.preinst, debian/initramfs-tools.postinst: Do the
|
||||
migration of the mkinitrd settings in the preinst. (closes: #376604) Thanks
|
||||
for the checks to Justin Pryzby <justinpryzby@users.sourceforge.net>.
|
||||
|
||||
* debian/initramfs-tools.preinst: Reorder. Generate an modules file similar
|
||||
to the one we ship. This should minimize Sarge upgrade prompting if no
|
||||
relevant modules where added to /etc/mkinitrd/modules.
|
||||
|
||||
* conf/initramfs.conf: Make it more similar to /etc/mkinitrd/modules.
|
||||
|
||||
* Set urgency high for RC fixes upload.
|
||||
|
||||
-- maximilian attems <maks@sternwelten.at> Fri, 7 Jul 2006 11:45:56 +0200
|
||||
|
||||
initramfs-tools (0.67) unstable; urgency=high
|
||||
|
||||
|
||||
33
debian/initramfs-tools.postinst
vendored
33
debian/initramfs-tools.postinst
vendored
@ -2,39 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = configure ]; then
|
||||
if [ x${2} = x ]; then
|
||||
|
||||
# First time install. Can we autodetect the RESUME partition?
|
||||
RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ')
|
||||
|
||||
# Inhertic initrd-tools settings if possible.
|
||||
if [ -e /etc/mkinitrd/mkinitrd.conf ]; then
|
||||
. /etc/mkinitrd/mkinitrd.conf
|
||||
fi
|
||||
|
||||
if [ -e /etc/mkinitrd/modules ]; then
|
||||
cp /etc/mkinitrd/modules /etc/initramfs-tools
|
||||
sed -i \
|
||||
-e 's/mkinitrd/mkinitramfs/g' \
|
||||
-e '/^ide-generic/d' \
|
||||
-e '/^ide-disk/d' \
|
||||
-e '/^ext2/d' \
|
||||
-e '/^ext3/d' \
|
||||
/etc/initramfs-tools/modules
|
||||
fi
|
||||
|
||||
if [ -e ${RESUME} ]; then
|
||||
echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume
|
||||
fi
|
||||
|
||||
if [ -e /etc/mkinitrd/DSDT ]; then
|
||||
cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# Regenerate initramfs on upgrade
|
||||
if [ "$1" = "configure" -a -n "$2" ]; then
|
||||
update-initramfs -u
|
||||
|
||||
35
debian/initramfs-tools.preinst
vendored
35
debian/initramfs-tools.preinst
vendored
@ -3,6 +3,41 @@
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if [ -n "$2" ]; then
|
||||
# First time install. Can we autodetect the RESUME partition?
|
||||
RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ')
|
||||
|
||||
# Inhertic initrd-tools settings if possible.
|
||||
if [ -e /etc/mkinitrd/mkinitrd.conf ]; then
|
||||
. /etc/mkinitrd/mkinitrd.conf
|
||||
fi
|
||||
if [ -e ${RESUME} ]; then
|
||||
echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume
|
||||
fi
|
||||
|
||||
# Add initrd-tools modules, while trying to minimize prompting
|
||||
if [ -e /etc/mkinitrd/modules ]; then
|
||||
cp /etc/mkinitrd/modules /etc/initramfs-tools
|
||||
sed -i \
|
||||
-e 's/\/etc\/mkinitrd\/modules: Kernel modules to load for initrd./List of modules that you want to include in your initramfs./g' \
|
||||
-e 's/mkinitrd/update-initramfs/g' \
|
||||
-e '/# This file should/,/one per line\./d' \
|
||||
-e 's/Comments begin with.*/Syntax: module_name [args ...]/' \
|
||||
-e 's/^# ext2$/# raid1/' \
|
||||
-e 's/^# wd io=0x300$/# sd_mod/'
|
||||
-e '/^ide-generic/d' \
|
||||
-e '/^ide-disk/d' \
|
||||
-e '/^ext2/d' \
|
||||
-e '/^ext3/d' \
|
||||
/etc/initramfs-tools/modules
|
||||
fi
|
||||
|
||||
if [ -e /etc/mkinitrd/DSDT ]; then
|
||||
cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
upgrade)
|
||||
if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then
|
||||
if [ -d /etc/initramfs-tools ]; then
|
||||
|
||||
14
mkinitramfs
14
mkinitramfs
@ -112,6 +112,9 @@ if [ ! -e "${MODULESDIR}" ]; then
|
||||
echo "Cannot find ${MODULESDIR}"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -e "${MODULESDIR}/modules.depmod" ]; then
|
||||
depmod ${version}
|
||||
fi
|
||||
|
||||
DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
|
||||
__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
|
||||
@ -175,9 +178,14 @@ done
|
||||
echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root
|
||||
|
||||
# Busybox
|
||||
rm -f ${DESTDIR}/bin/sh
|
||||
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
|
||||
ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
|
||||
if [ "x${BUSYBOX}" = "xn" ]; then
|
||||
ln -s ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh
|
||||
echo "Warning: Busybox is required for successful boot!"
|
||||
else
|
||||
rm -f ${DESTDIR}/bin/sh
|
||||
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
|
||||
ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
|
||||
fi
|
||||
|
||||
# Modutils
|
||||
copy_exec /sbin/modprobe /sbin
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user