r4655 - dists/trunk/utils/initramfs-tools

maximilian attems maks-guest at costa.debian.org
Wed Oct 26 08:26:03 UTC 2005


Author: maks-guest
Date: 2005-10-26 08:26:02 +0000 (Wed, 26 Oct 2005)
New Revision: 4655

Added:
   dists/trunk/utils/initramfs-tools/README
Removed:
   dists/trunk/utils/initramfs-tools/conf/
   dists/trunk/utils/initramfs-tools/debian/
   dists/trunk/utils/initramfs-tools/docs/
   dists/trunk/utils/initramfs-tools/hook-functions
   dists/trunk/utils/initramfs-tools/hooks/
   dists/trunk/utils/initramfs-tools/init
   dists/trunk/utils/initramfs-tools/initramfs.conf.5
   dists/trunk/utils/initramfs-tools/mkinitramfs
   dists/trunk/utils/initramfs-tools/mkinitramfs.8
   dists/trunk/utils/initramfs-tools/scripts/
   dists/trunk/utils/initramfs-tools/update-initramfs
   dists/trunk/utils/initramfs-tools/update-initramfs.8
Log:
cleanup old initramfs-tools,
provide pointers where to find current repo.


Added: dists/trunk/utils/initramfs-tools/README
===================================================================
--- dists/trunk/utils/initramfs-tools/README	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/README	2005-10-26 08:26:02 UTC (rev 4655)
@@ -0,0 +1,13 @@
+initramfs-tools uses bzr for it's dev.
+Daily bzr, bzr-tools snapshots are provided by jbailey, 
+add this line to your /etc/apt/sources.list:
+deb http://people.ubuntu.com/~jbailey/snapshot/bzr/ ./
+
+# jbailey branch
+bzr branch http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools
+
+# Debian branch (current)
+bzr branch http://debian.stro.at/bzr-test/initramfs-tools/
+
+# Update your branch
+bzr pull

Deleted: dists/trunk/utils/initramfs-tools/hook-functions
===================================================================
--- dists/trunk/utils/initramfs-tools/hook-functions	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/hook-functions	2005-10-26 08:26:02 UTC (rev 4655)
@@ -1,145 +0,0 @@
-# -*- shell-script -*-
-
-catenate_cpiogz() {
-	# Sanity check
-	if [ ! -e "${1}" ]; then
-		echo "W:catenate_cpiogz: arg1='${1}' does not exist." >&2
-		return
-	fi
-
-	cat "${1}" >>"${__TMPCPIOGZ}"
-}
-
-force_load()
-{
-		manual_add_modules ${@}
-		echo "${@}" >>"${DESTDIR}/conf/modules"
-}
-
-# Takes a file containing a list of modules to be added as an
-# argument, figures out dependancies, and adds them.
-#
-# Input file syntax:
-#
-#   # comment
-#   modprobe_module_name [args ...]
-#   [...]
-#
-add_modules_from_file()
-{
-	# Sanity check
-	if [ ! -e "${1}" ]; then
-		echo "W:add_modules_from_file: arg1='${1}' does not exist." >&2
-		return
-	fi
-
-	sed -e '/^#/d' ${1} | while read module rest; do
-		force_load "${module}" "${rest}"
-	done
-}
-
-manual_add_modules()
-{
-	for mam_x in $(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '{ print $2 }'); do
-		# Prune duplicates
-		if [ -e "${DESTDIR}/${mam_x}" ]; then
-			continue
-		fi
-
-		mkdir -p "${DESTDIR}/$(dirname "${mam_x}")"
-		ln -s "${mam_x}" "${DESTDIR}/$(dirname "${mam_x}")"
-	done
-}
-
-# Copy entire subtrees to the initramfs
-copy_modules_dir()
-{
-	tmpdir_modbase="${DESTDIR}/lib/modules/${version}"
-	mkdir -p "$(dirname "${tmpdir_modbase}/${1}")"
-	cp -a "${MODULESDIR}/${1}" "${tmpdir_modbase}/${1}"
-}
-
-dep_add_modules()
-{
-
-	# Things that are too hard to autodetect.
-	for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do
-		manual_add_modules "${x}"
-	done
-
-	for x in /sys/bus/pci/devices/*; do
-		if [ -e "${x}/modalias" ]; then
-			manual_add_modules $(cat "${x}/modalias")
-		fi
-	done
-
-	for x in /sys/bus/usb/devices/*; do
-		if [ -e "${x}/modalias" ]; then
-			manual_add_modules $(cat "${x}/modalias")
-		fi
-	done
-
-	if [ -e /proc/ide ]; then
-		for x in ide-generic ide-disk ide-cd; do
-			manual_add_modules "${x}"
-		done
-	fi
-
-	if [ -e /sys/bus/scsi/devices/ ]; then
-		manual_add_modules sd_mod
-	fi
-
-	if [ -e /sys/bus/i2o/devices/ ]; then
-		manual_add_modules i2o_block
-	fi
-}
-
-
-# Modules that we always add to the initramfs
-auto_add_modules()
-{
-	# base
-	for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do
-		manual_add_modules "${x}"
-	done
-
-	# Ethernet
-	for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi forcedeth hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire sundance sungem sungem_phy sunhme tg3 tlan de2104x de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb typhon via-rhine via-velocity yellowfin; do
-		manual_add_modules "${x}"
-	done
-
-	# ide
-	for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do
-		manual_add_modules "${x}"
-	done
-
-	# scsi
-	for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv sata_qstor sata_sil sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc scsi_mod scsi_transport_fc scsi_transport_iscsi scsi_transport_spi sd_mod sym53c8xx tmscsim; do
-		manual_add_modules "${x}"
-	done
-
-	# i2o
-	for x in i2o_block; do
-		manual_add_modules "${x}"
-	done
-
-}
-
-usage()
-{
-	cat >&2 << EOF
-
-Usage: ${0} [OPTION]... <-o outfile> [version]
-
-Options:
-  -d confdir  Specify an alternative configuration directory.
-  -k          Keep temporary directory used to make the image.
-  -o outfile  Write to outfile.
-  -r root     Override ROOT setting in mkinitrd.conf.
-
-See ${0}(8) for further details.
-EOF
-	exit 1
-
-}
-

Deleted: dists/trunk/utils/initramfs-tools/init
===================================================================
--- dists/trunk/utils/initramfs-tools/init	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/init	2005-10-26 08:26:02 UTC (rev 4655)
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-echo "Loading, please wait..."
-
-mkdir /sys
-mkdir /proc
-mkdir /tmp
-mkdir -p /var/lock
-mount -t sysfs sysfs /sys
-mount -t proc proc /proc
-mount -t ramfs none /dev
-touch /dev/.initramfs-tools
-mknod /dev/console c 5 1 
-mknod /dev/null c 1 3
-
-. /conf/initramfs.conf
-. /scripts/functions
-
-# Parse command line options
-export break=
-export init=/sbin/init
-export quiet=n
-export readonly=y
-export ROOT=
-export resume=${RESUME}
-export rootmnt=/root
-export debug=
-for x in $(cat /proc/cmdline); do
-	case $x in
-	init=*)
-		init=${x#init=}
-		;;
-	root=*)
-		ROOT=${x#root=}
-		;;
-	nfsroot=*)
-		NFSROOT=${x#nfsroot=}
-		;;
-	boot=*)
-		BOOT=${x#boot=}
-		;;
-	resume=*)
-		resume=${x#resume=}
-		;;
-	quiet)
-		quiet=y
-		;;
-	ro)
-		readonly=y
-		;;
-	rw)
-		readonly=n
-		;;
-	debug)
-		debug=y
-		exec >/tmp/initramfs.debug 2>&1
-		set -x
-		;;
-	break)
-		break=yes
-		;;
-	esac
-done
-
-# Don't do log messages here to avoid confusing usplash
-run_scripts /scripts/init-top
-
-. /scripts/${BOOT}
-
-depmod -a
-
-# Populate /dev tree
-log_begin_msg "Initializing /dev"
-mkdir /dev/.udevdb
-UDEVD_EXPECTED_SEQNUM=$(($(cat /sys/kernel/hotplug_seqnum) + 1)) udevd --daemon
-udevsynthesize
-sleep 2
-log_end_msg
-
-log_begin_msg "Loading modules"
-load_modules
-log_end_msg
-
-parse_numeric ${ROOT}
-
-if [ x${break} = xyes ]; then 
-	panic "Spawning shell within the initramfs"
-fi
-
-log_begin_msg "Running /scripts/init-premount"
-run_scripts /scripts/init-premount
-log_end_msg
-
-killall udevd
-
-log_begin_msg "Mounting root file system"
-mountroot
-log_end_msg
-
-[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom"
-run_scripts /scripts/init-bottom
-[ "$quiet" != "y" ] && log_end_msg
-
-# Move our /dev to the real filesystem.  Do the setup that udev otherwise
-# would.
-mkdir -p /dev/.static/dev
-chmod 700 /dev/.static/
-mount -n -o bind ${rootmnt}/dev /dev/.static/dev
-mount -n -o move /dev ${rootmnt}/dev
-
-umount /sys
-umount /proc
-
-if [ ! -x ${rootmnt}${init} ]; then
-	panic "Target filesystem doesn't have ${init}"
-fi
-
-# Chain to real filesystem
-exec run-init ${rootmnt} ${init} "$@" </root/dev/console >/root/dev/console

Deleted: dists/trunk/utils/initramfs-tools/initramfs.conf.5
===================================================================
--- dists/trunk/utils/initramfs-tools/initramfs.conf.5	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/initramfs.conf.5	2005-10-26 08:26:02 UTC (rev 4655)
@@ -1,57 +0,0 @@
-.TH INITRAMFS.CONF 5  "$Date: 2005/09/13 $" "" "initramfs.conf manual"
-
-.SH NAME
-initramfs.conf \- configuration file for mkinitramfs
-
-.SH DESCRIPTION
-The behaviour of
-.B mkinitramfs 
-can be modified by its configuration file.
-
-Each line in the file can be a configuration variable, a blank line,
-or a comment. The value of an variable is assigned by an statement
-of the form: \fIname\fP=[\fIvalue\fP]
-
-.SH GENERAL VARIABLES
-.TP
-\fB MODULES
-Specifies the modules for the initramfs image.
-The default setting is \fImost\fP.
-
-\fImost\fP adds all the framebuffer, acpi, file system, ide, sata, scsi and usb drivers.
-
-\fIdep\fP tries to guess which modules are necessary for the running box.
-
-\fIlist\fP includes only modules from the additional modules list.
-
-.TP
-\fB RESUME
-Optional setting of the swap partition to resume from.
-The resume= passed on the command line of your boot loader 
-will override this setting.
-
-.SH NFS VARIABLES
-.TP
-\fB BOOT
-Allows to use an nfs drive as the root of the drive. 
-The default is to boot of an \fIlocal\fP media (harddrive, USB stick).
-Set to \fInfs\fP for an NFS root share.
-
-.TP
-\fB DEVICE
-Specifies the network interface, like eth0.
-
-.TP
-\fB NFSROOT
-Defaults to \fIauto\fP in order to pick up value from DHCP server.
-Otherwise you need to specify \fIHOST:MOUNT\fP.
-
-.SH SEE ALSO
-
-.BR mkinitramfs (8)
-
-.SH AUTHOR
-The initramfs-tools are written by Jeff Bailey <jbailey at raspberryginger.com>.
-This manual is maintained by Maximilian Attems <maks at sternwelten.at>.
-Loosely based on mkinitrd.conf by Herbert Xu.
-

Deleted: dists/trunk/utils/initramfs-tools/mkinitramfs
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-26 08:26:02 UTC (rev 4655)
@@ -1,224 +0,0 @@
-#!/bin/sh
-
-umask 0022
-
-# Defaults
-keep="n"
-CONFDIR="/etc/mkinitramfs"
-verbose="n"
-errors_to="2>/dev/null"
-# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
-BUSYBOXDIR="/bin" 
-
-TEMP=`getopt -o d:ko:r: --long supported-host-version:,supported-target-version: -n "$0" -- "$@"`
-
-# Check for non-GNU getopt
-if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
-
-eval set -- "$TEMP"
-
-while true ; do
-	case "$1" in
-	-d)
-		CONFDIR="$2"
-		shift 2
-		if [ ! d "${CONFDIR}" ]; then
-			echo "${0}: ${CONFDIR}: Not a directory" >&2
-			exit 1
-		fi
-		;;
-	-o)
-		touch $2
-		outfile="$(readlink -f "$2")"
-		shift 2
-		;;
-	-k)
-		keep="y"
-		shift
-		;;
-	-r)
-		# ignore (FIXME: manpage says differently?!?)
-		shift 2
-		;;
-	--supported-host-version)
-		supported_host_version="$2"
-		shift 2
-		;;
-	--supported-target-version)
-		supported_target_version="$2"
-		shift 2
-		;;
-	--)
-		shift
-		break
-		;;
-	*)
-		echo "Internal error!" >&2
-		exit 1
-		;;
-	esac
-done
-
-if [ -n "$supported_host_version" ] || [ -n "$supported_target_version" ]; then
-	if [ -n "$supported_host_version" ]; then
-		host_upstream_version="${supported_host_version%%-*}"
-	fi
-	if [ -n "$supported_target_version" ]; then
-		target_upstream_version="${supported_target_version%%-*}"
-		if dpkg --compare-versions "$target_upstream_version" lt "2.6.12"; then
-			exit 1
-		fi
-	fi
-	exit 0
-fi
-
-# For dependency ordered mkinitramfs hook scripts.
-. /usr/share/initramfs-tools/scripts/functions
-. /usr/share/initramfs-tools/hook-functions
-
-. "${CONFDIR}/initramfs.conf"
-
-if [ -z "${outfile}" ]; then
-	usage
-fi
-
-# And by "version" we really mean path to kernel modules
-# This is braindead, and exists to preserve the interface with mkinitrd
-if [ ${#} -ne 1 ]; then
-	version="$(uname -r)"
-else
-	version="${1}"
-fi
-
-if dpkg --compare-versions "${version}" lt 2.6.12; then
-	echo "Kernel version too old.  initramfs-tools requires at least 2.6.12."
-	exit 1
-fi
-
-case "${version}" in
-/lib/modules/*/[!/]*)
-        ;;
-/lib/modules/[!/]*)
-        version="${version#/lib/modules/}"
-        version="${version%%/*}"
-        ;;
-esac
-
-case "${version}" in
-*/*)
-        echo "$PROG: ${version} is not a valid kernel version" >&2
-        exit 1
-        ;;
-esac
-
-if [ -d "${outfile}" ]; then
-	echo "${outfile} is a directory"
-	exit 1
-fi
-
-MODULESDIR="/lib/modules/${version}"
-
-if [ ! -e "${MODULESDIR}" ]; then
-	echo "Cannot find ${MODULESDIR}"
-	exit 1
-fi
-
-DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
-__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
-
-# Export environment for hook scripts.
-#
-export MODULESDIR
-export version
-export CONFDIR
-export DESTDIR
-
-# Private, used by 'catenate_cpiogz'.
-export __TMPCPIOGZ
-
-for d in bin conf etc lib modules sbin scripts; do
-    mkdir -p "${DESTDIR}/${d}"
-done
-
-# MODULES=list case.  Always honour.
-for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do
-	if [ -f "${x}" ]; then
-		add_modules_from_file "${x}"
-	fi
-done
-
-if [ "${MODULES}" = "dep" ]; then
-	dep_add_modules
-fi
-
-if [ "${MODULES}" = "most" ]; then
-	auto_add_modules
-fi
-
-# Have to do each file, because cpio --dereference doesn't recurse down
-# symlinks.
-
-cp /usr/share/initramfs-tools/init "${DESTDIR}/init"
-cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts"
-for f in $(cd /etc/mkinitramfs/scripts && \
-	find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \
-		-o -type f -print); do
-	mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")"
-cp -p "/etc/mkinitramfs/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")"
-done
-cp "${CONFDIR}/initramfs.conf" "${DESTDIR}/conf"
-cp -a /etc/udev "${DESTDIR}/etc"
-
-# udev
-cp /sbin/udev "${DESTDIR}/sbin"
-cp /sbin/udevd "${DESTDIR}/sbin"
-cp /sbin/udevsynthesize "${DESTDIR}/sbin"
-cp -a /lib/hotplug "${DESTDIR}/lib"
-
-# Busybox
-cp "${BUSYBOXDIR}/busybox" "${DESTDIR}/bin/busybox"
-
-# Modutils
-cp /sbin/modprobe "${DESTDIR}/sbin"
-cp /sbin/depmod "${DESTDIR}/sbin"
-cp /sbin/rmmod "${DESTDIR}/sbin"
-mkdir -p "${DESTDIR}/etc/modprobe.d"
-cp /etc/modprobe.d/aliases "${DESTDIR}/etc/modprobe.d"
-
-# Raid
-cp /sbin/mdadm "${DESTDIR}/sbin"
-cp /sbin/mdrun "${DESTDIR}/sbin"
-
-# LVM
-cp /lib/lvm-200/vgchange "${DESTDIR}/sbin"
-
-mklibs-copy -d "${DESTDIR}/lib" --root="${DESTDIR}" $(find "${DESTDIR}" -type f -perm +0111 -o -name '*.so')
-
-ln -s /usr/lib/klibc/bin/* "${DESTDIR}/bin"
-ln -s /usr/lib/klibc/lib/* "${DESTDIR}/lib"
-
-rm "${DESTDIR}/bin/sh"
-ln -s busybox "${DESTDIR}/bin/sh"
-
-run_scripts /usr/share/initramfs-tools/hooks
-run_scripts /etc/mkinitramfs/hooks
-
-# Apply DSDT to initramfs
-if [ -e "${CONFDIR}/DSDT.aml" ]; then
-	cp "${CONFDIR}/DSDT.aml" "${DESTDIR}"
-fi
-
-(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}")
-
-if [ -s "${__TMPCPIOGZ}" ]; then
-    cat "${__TMPCPIOGZ}" >>"${outfile}"
-fi
-
-if [ "${keep}" = "y" ]; then
-	echo "Working files in ${DESTDIR} and overlay in ${__TMPCPIOGZ}"
-else
-	rm -rf "${DESTDIR}"
-	rm -rf "${__TMPCPIOGZ}"
-fi
-
-exit 0

Deleted: dists/trunk/utils/initramfs-tools/mkinitramfs.8
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs.8	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs.8	2005-10-26 08:26:02 UTC (rev 4655)
@@ -1,97 +0,0 @@
-.TH MKINITRAMFS 8  "$Date: 2005/07/15 $" "" "mkinitramfs manual"
-
-.SH NAME
-mkinitramfs \- generate an initramfs image
-
-.SH SYNOPSIS
-.B mkinitramfs
-.RB [ \-d 
-.IR confdir ] 
-.RB [ \-k ] 
-.RB [ \-o 
-.IR outfile ] 
-.RB [ \-r 
-.IR root ] 
-.RI [ version ]
-
-.B mkinitramfs
-.RB [ \-\-supported-host-version=
-.IR hversion ]
-.RB [ \-\-supported-target-version=
-.IR tversion ]
-
-.SH DESCRIPTION
-The
-.B mkinitramfs 
-script generates an initramfs image.  The initramfs is an cpio archive. 
-At boot time, the kernel unpacks that archive into ram disk, mounts and 
-uses it as initial root file system. All finding of the root device 
-happens in this early userspace.
- 
-.PP
-
-The second syntax returns 0 if mkinitramfs can create a ramdisk running on a kernel
-of the given host version (
-.IR hversion
-) and for a kernel of the given target version (
-.IR tversions
-), and 1 otherwise.
-
-.SH OPTIONS
-.TP
-\fB \-d \fI confdir
-Set an alternate configuration directory.
-
-.TP
-\fB \-k
-Keep the temporary directory used to make the image.
-
-.TP
-\fB \-o \fI outfile
-Write the image to 
-.IR outfile .
-
-.TP
-\fB \-r \fI root
-Override the 
-.B ROOT 
-setting in 
-.IR mkinitramfs.conf .
-
-.TP
-\fB\-\-supported-host-version=\fIhversion
-This option queries if mkinitramfs can create ramdisks on a running kernel of version
-.IR hversion .
-
-.TP
-\fB\-\-supported-target-version=\fItversion
-This option queries if mkinitramfs can create ramdisks for kernel version
-.IR tversion .
-
-.SH FILES
-.TP
-.I /etc/mkinitramfs/initramfs.conf
-The default configuration file for the script. See
-.BR initramfs.conf (5)
-for a description of the available configuration parameter.
-
-.TP
-.I /etc/mkinitramfs/modules
-Specified modules will be put in the generated image and loaded when the system boots. The format - one per line - is identical to that of
-.I /etc/modules,
-which is described in
-.BR modules (5).
-
-.TP
-.I /etc/mkinitramfs/DSDT.aml
-If this file exists, it will be appended to the initramfs in a way that causes
-it to be loaded by ACPI.
-
-
-.SH AUTHOR
-The initramfs-tools are written by Jeff Bailey <jbailey at ubuntu.com>.
-This manual is maintained by Maximilian Attems <maks at sternwelten.at>.
-
-.SH SEE ALSO
-
-.BR initramfs.conf (5)

Deleted: dists/trunk/utils/initramfs-tools/update-initramfs
===================================================================
--- dists/trunk/utils/initramfs-tools/update-initramfs	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/update-initramfs	2005-10-26 08:26:02 UTC (rev 4655)
@@ -1,281 +0,0 @@
-#!/bin/sh
-
-STATEDIR=/var/lib/initramfs-tools
-BOOTDIR=/boot
-
-set -e
-
-usage()
-{
-	if [ -n "${1}" ]; then
-		printf "${@}\n\n" >&2
-	fi
-	cat >&2 << EOF
-Usage: ${0} [OPTION]...
-
-Options:
- -k [version]	Specify kernel version or ALL
- -c		Create a new initramfs
- -u		Update an existing initramfs
- -d		Remove an existing initramfs
- -t		Take over a custom initramfs with this one
- -v		Be verbose
- -h		This message
-
-EOF
-	exit 1
-}
-
-mild_panic()
-{
-	if [ -n "${1}" ]; then
-		printf "${@}\n" >&2
-	fi
-	exit 0
-}
-
-panic()
-{
-	if [ -n "${1}" ]; then
-		printf "${@}\n" >&2
-	fi
-	exit 1
-}
-
-verbose()
-{
-	if [ "${verbose}" = 1 ]; then
-		printf "${@}\n"
-	fi
-}
-
-version_exists()
-{
-	[ -e "${STATEDIR}/${1}" ]
-	return $?
-}
-
-set_initramfs()
-{
-	initramfs="${BOOTDIR}/initrd.img-${version}"
-}
-
-generate_initramfs()
-{
-	verbose "Generating ${initramfs}"
-	mkinitramfs -o "${initramfs}" "${version}"
-	set_sha1
-}
-
-compare_sha1()
-{
-	sha1sum "${initramfs}" | diff "${STATEDIR}/${version}" - >/dev/null 2>&1
-	return $?
-}
-
-# Note that this must overwrite so that updates work.
-set_sha1()
-{
-	sha1sum "${initramfs}" > "${STATEDIR}/${version}"
-}
-
-delete_sha1()
-{
-	rm -f "${STATEDIR}/${version}"
-}
-
-get_sorted_versions()
-{
-	version_list=""
-
-	for gsv_x in "${STATEDIR}"/*; do
-		gsv_x="$(basename "${gsv_x}")"
-		if [ "${gsv_x}" = '*' ]; then
-			verbose "Nothing to do, exiting."
-			exit 0
-		fi
-		worklist=""
-		for gsv_i in $version_list; do
-			if dpkg --compare-versions "${gsv_x}" '>' "${gsv_i}"; then
-				worklist="${worklist} ${gsv_x} ${gsv_i}"
-				gsv_x=""
-			else
-				worklist="${worklist} ${gsv_i}"
-			fi
-		done
-		if [ "${gsv_x}" != "" ]; then
-			worklist="${worklist} ${gsv_x}"
-		fi
-		version_list="${worklist}"
-	done
-
-	verbose "Available versions: ${version_list}"
-}
-
-set_linked_version()
-{
-	if [ -L /initrd.img ]; then
-		linktarget="$(basename "$(readlink /initrd.img)")"
-	fi
-
-	if [ -L /boot/initrd.img ]; then
-		linktarget="$(basename "$(readlink /boot/initrd.img)")"
-	fi
-
-	if [ -z "${linktarget}" ]; then
-		return
-	fi
-
-	version="${linktarget##initrd.img-}"
-}
-
-set_highest_version()
-{
-	get_sorted_versions
-	set - ${version_list}
-	version=${1}
-}
-
-create()
-{
-	if [ -z "${version}" ]; then
-		usage "Create mode requires a version argument"
-	fi
-
-	set_initramfs
-
-	if [ "${takeover}" = 0 ]; then
-		if version_exists "${version}"; then
-			panic "Cannot create version ${version}: already exists"
-		fi
-	
-		if [ -e "${initramfs}" ]; then
-			panic "${initramfs} already exists, cannot create."
-		fi
-	fi
-
-	generate_initramfs
-}
-
-update()
-{
-	if [ -z "${version}" ]; then
-		set_linked_version
-	fi
-
-	if [ -z "${version}" ]; then
-		set_highest_version
-	fi
-
-	if [ "${version}" = "all" ]; then
-		: FIXME check for --yes, and if not ask are you sure
-		get_sorted_versions
-		for u_version in ${version_list}; do
-			if [ "${verbose}" = "1" ]; then
-				vflag="-v"
-			fi
-			# Don't stop if one version doesn't work.
-			set +e
-			"${0}" "${vflag}" -u -k "${u_version}"
-			set -e
-		done
-		exit 0
-	fi
-
-	set_initramfs
-
-	altered_check
-
-	generate_initramfs
-
-}
-
-delete()
-{
-	if [ -z "${version}" ]; then
-		usage "Delete mode requires a version argument"
-	fi
-
-	set_initramfs
-
-	if [ ! -e "${initramfs}" ]; then
-		panic "Cannot delete ${initramfs}, doesn't exist."
-	fi
-	
-	if ! version_exists "${version}"; then
-		panic "Cannot delete version ${version}: Not created by this utility."
-	fi
-
-	altered_check
-
-	delete_sha1
-
-	rm -f "${initramfs}"
-}
-
-
-altered_check()
-{
-	if [ "${takeover}" = 0 ]; then
-		if ! compare_sha1; then
-			delete_sha1
-			mild_panic "${initramfs} was been altered.  Cannot update."
-		fi
-	fi
-}
-
-# Defaults
-verbose=0
-yes=0
-takeover=0
-
-##
-
-while getopts "k:cudyvht?" flag; do
-	case "${flag}" in
-	k)
-		version="${OPTARG}"	
-		;;
-	c)
-		mode="c"
-		;;
-	d)
-		mode="d"
-		;;
-	u)
-		mode="u"
-		;;
-	v)
-		verbose="1"
-		;;
-	y)
-		yes="1"
-		;;
-	t)
-		takeover="1"
-		;;
-	h|?)
-		usage
-		;;
-	esac
-done
-
-# Validate arguments
-
-if [ -z "${mode}" ]; then
-	usage "You must specify at least one of -c, -u, or -d."
-fi
-
-case "${mode}" in
-	c)
-		create
-		;;
-	d)
-		delete
-		;;
-	u)
-		update
-		;;
-esac
-
-

Deleted: dists/trunk/utils/initramfs-tools/update-initramfs.8
===================================================================
--- dists/trunk/utils/initramfs-tools/update-initramfs.8	2005-10-26 06:37:57 UTC (rev 4654)
+++ dists/trunk/utils/initramfs-tools/update-initramfs.8	2005-10-26 08:26:02 UTC (rev 4655)
@@ -1,60 +0,0 @@
-.TH UPDATE-INITRAMFS 8  "$Date: 2005/09/20" $" "" "update-initramfs manual"
-
-.SH NAME
-update-initramfs \- generate an initramfs image
-
-.SH SYNOPSIS
-.B update-initramfs
-.RB [ \-k 
-.IR version ] 
-.RB [ \-c ] 
-.RB [ \-u ] 
-.RB [ \-t ] 
-.RB [ \-v ] 
-.RB [ \-h ] 
-.SH DESCRIPTION
-The
-.B update-initramfs 
-script manages your initramfs images.  The initramfs is an cpio archive. 
-At boot time, the kernel unpacks that archive into ram disk, mounts and 
-uses it as initial root file system. All finding of the root device 
-happens in this early userspace.
-
-.SH OPTIONS
-.TP
-\fB \-k \fI version
-Set the kernel for whom the initramfs will be generated.
-
-.TP
-\fB \-c
-Create a new initramfs.
-
-.TP
-\fB \-u
-Update an existing initramfs.
-
-.TP
-\fB \-d
-Remove an existing initramfs.
-
-.TP
-\fB \-t
-Take over a custom initramfs with this one.
-
-.TP
-\fB \-v
-This option increases the amount of information you are given during
-the chosen action.
-
-.TP
-\fB \-h
-Print a short help page describing the available options in 
-.B update-initramfs.
-
-.SH AUTHOR
-The initramfs-tools are written by Jeff Bailey <jbailey at ubuntu.com>.
-This manual is maintained by Maximilian Attems <maks at sternwelten.at>.
-
-.SH SEE ALSO
-
-.BR initramfs.conf (5)




More information about the Kernel-svn-changes mailing list