Skip to content
Browse files

Re-installed Plymouth

dist-upgrade which included a new kernel
Restored /etc/dhcp/dhclient.conf to defaults to hopefully deal with complaint that some machines fail to get an IP
  • Loading branch information...
1 parent 52602df commit b8d7a6f8de520fcce9f31293b10d0967f59b3f43 @kaihendry kaihendry committed Aug 14, 2012
Showing with 10,550 additions and 0 deletions.
  1. +91 −0 etc/init.d/plymouth
  2. +1 −0 etc/rc0.d/K02plymouth
  3. +1 −0 etc/rc2.d/S21plymouth
  4. +1 −0 etc/rc3.d/S21plymouth
  5. +1 −0 etc/rc4.d/S21plymouth
  6. +1 −0 etc/rc5.d/S21plymouth
  7. +1 −0 etc/rc6.d/K02plymouth
  8. +1 −0 initrd.img
  9. BIN lib/modules/3.2.0-3artax1-686-pae/kernel/drivers/hwmon/sch5636.ko
  10. +543 −0 usr/share/initramfs-tools/hook-functions
  11. +25 −0 usr/share/initramfs-tools/hooks/busybox
  12. +62 −0 usr/share/initramfs-tools/hooks/keymap
  13. +33 −0 usr/share/initramfs-tools/hooks/klibc
  14. +117 −0 usr/share/initramfs-tools/hooks/plymouth
  15. +68 −0 usr/share/initramfs-tools/hooks/thermal
  16. +329 −0 usr/share/initramfs-tools/init
  17. +11 −0 usr/share/initramfs-tools/modules
  18. +425 −0 usr/share/initramfs-tools/scripts/functions
  19. +17 −0 usr/share/initramfs-tools/scripts/init-bottom/plymouth
  20. +39 −0 usr/share/initramfs-tools/scripts/init-premount/plymouth
  21. +27 −0 usr/share/initramfs-tools/scripts/init-top/all_generic_ide
  22. +25 −0 usr/share/initramfs-tools/scripts/init-top/blacklist
  23. +27 −0 usr/share/initramfs-tools/scripts/init-top/keymap
  24. +112 −0 usr/share/initramfs-tools/scripts/local
  25. +63 −0 usr/share/initramfs-tools/scripts/local-premount/resume
  26. +80 −0 usr/share/initramfs-tools/scripts/nfs
  27. +3,698 −0 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.list
  28. +3,077 −0 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.md5sums
  29. +712 −0 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.postinst
  30. +272 −0 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.postrm
  31. +124 −0 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.preinst
  32. +163 −0 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.prerm
  33. +401 −0 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.templates
  34. +1 −0 var/lib/update-rc.d/plymouth
  35. +1 −0 vmlinuz
View
91 etc/init.d/plymouth
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: plymouth
+# Required-Start: udev $remote_fs $all
+# Required-Stop: $remote_fs
+# Should-Start: gdm gdm3 kdm xdm slim nodm
+# Should-Stop: gdm gdm3 kdm xdm slim nodm
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 6
+# Short-Description: Stop plymouth during boot and start it on shutdown
+### END INIT INFO
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+NAME="plymouth"
+DESC="Boot splash manager"
+SPLASH="false"
+
+test -x /sbin/plymouthd || exit 0
+
+if [ -r "/etc/default/${NAME}" ]
+then
+ . "/etc/default/${NAME}"
+fi
+
+set -e
+
+Start_plymouthd ()
+{
+ if ! plymouth --ping
+ then
+ /sbin/plymouthd --mode=${1} --attach-to-session
+ fi
+}
+
+for ARGUMENT in $(cat /proc/cmdline)
+do
+ case "${ARGUMENT}" in
+ splash*)
+ SPLASH="true"
+ ;;
+
+ nosplash*)
+ SPLASH="false"
+ ;;
+ esac
+done
+
+case "${1}" in
+ start)
+ if [ "${SPLASH}" = "true" ]
+ then
+ /bin/plymouth --quit
+ fi
+ ;;
+
+ stop)
+ if [ "$SPLASH" = "true" ]
+ then
+ Start_plymouthd shutdown
+
+ RUNLEVEL="$(/sbin/runlevel | cut -d " " -f 2)"
+
+ case "${RUNLEVEL}" in
+ 0)
+ TEXT="Shutting down system..."
+ ;;
+
+ 6)
+ TEXT="Restarting system..."
+ ;;
+ esac
+
+ /bin/plymouth message --text="${TEXT}"
+
+ /bin/plymouth --show-splash
+ fi
+ ;;
+
+ restart|force-reload)
+
+ ;;
+
+ *)
+ N="/etc/init.d/${NAME}"
+ echo "Usage: ${N} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
View
1 etc/rc0.d/K02plymouth
View
1 etc/rc2.d/S21plymouth
View
1 etc/rc3.d/S21plymouth
View
1 etc/rc4.d/S21plymouth
View
1 etc/rc5.d/S21plymouth
View
1 etc/rc6.d/K02plymouth
View
1 initrd.img
View
BIN lib/modules/3.2.0-3artax1-686-pae/kernel/drivers/hwmon/sch5636.ko
Binary file not shown.
View
543 usr/share/initramfs-tools/hook-functions
@@ -0,0 +1,543 @@
+# -*- 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 module [args...]
+force_load()
+{
+ manual_add_modules "$1"
+ 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
+
+ grep '^[^#]' ${1} | while read module args; do
+ [ -n "$module" ] || continue
+ force_load "${module}" "${args}"
+ done
+}
+
+# Add dependent modules + eventual firmware
+manual_add_modules()
+{
+ local prefix kmod options firmware
+
+ if [ $# -eq 0 ]; then
+ return
+ fi
+
+ modprobe --all --set-version="${version}" --ignore-install --quiet --show-depends "$@" |
+ while read prefix kmod options ; do
+ if [ "${prefix}" != "insmod" ]; then
+ continue
+ fi
+
+ # Prune duplicates
+ if [ -e "${DESTDIR}/${kmod}" ]; then
+ continue
+ fi
+
+ install -Dpm 644 "$kmod" "${DESTDIR}/$kmod"
+ if [ "${verbose}" = "y" ]; then
+ echo "Adding module ${kmod}"
+ fi
+
+ # Add required firmware
+ for firmware in $(modinfo -F firmware "${kmod}"); do
+ if [ -e "${DESTDIR}/lib/firmware/${firmware}" ] \
+ || [ -e "${DESTDIR}/lib/firmware/${version}/${firmware}" ]; then
+ continue
+ fi
+
+ # Only print warning for missing fw of loaded module
+ # or forced loaded module
+ if [ ! -e "/lib/firmware/${firmware}" ] \
+ && [ ! -e "/lib/firmware/${version}/${firmware}" ] ; then
+ # Only warn about missing firmware if
+ # /proc/modules exists
+ if [ ! -e /proc/modules ] ; then
+ continue
+ fi
+
+ if [ "${verbose}" != "y" ] \
+ && [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then
+ # the devicenumber/inode pair of / are not the same as that of /sbin/init's
+ # root, so we're in a chroot.
+ continue
+ fi
+
+ if [ "${verbose}" != "y" ] \
+ && ! grep -qs ':/$' /proc/1/cgroup; then
+ # the is a cgroup set, so we're in a container.
+ continue
+ fi
+
+ kmod_modname="${kmod##*/}"
+ kmod_modname="${kmod_modname%.ko}"
+ if grep -q "^$kmod_modname\\>" /proc/modules "${CONFDIR}/modules"; then
+ echo "W: Possible missing firmware /lib/firmware/${firmware} for module $(basename ${kmod} .ko)" >&2
+ fi
+ continue
+ fi
+
+ if [ -e "/lib/firmware/${version}/${firmware}" ]; then
+ copy_exec "/lib/firmware/${version}/${firmware}"
+ else
+ copy_exec "/lib/firmware/${firmware}"
+ fi
+ if [ "${verbose}" = "y" ]; then
+ echo "Adding firmware ${firmware}"
+ fi
+ done
+ done
+}
+
+# $1 = file to copy to ramdisk
+# $2 (optional) Name for the file on the ramdisk
+# Location of the image dir is assumed to be $DESTDIR
+# We never overwrite the target if it exists.
+copy_exec() {
+ local src target x nonoptlib
+ local libname dirname
+
+ src="${1}"
+ target="${2:-$1}"
+
+ [ -f "${src}" ] || return 1
+
+ if [ -d "${DESTDIR}/${target}" ]; then
+ # check if already copied
+ [ -e "${DESTDIR}/$target/${src##*/}" ] && return 0
+ else
+ [ -e "${DESTDIR}/$target" ] && return 0
+ #FIXME: inst_dir
+ mkdir -p "${DESTDIR}/${target%/*}"
+ fi
+
+ [ "${verbose}" = "y" ] && echo "Adding binary ${src}"
+ cp -pL "${src}" "${DESTDIR}/${target}"
+
+ # Copy the dependant libraries
+ for x in $(ldd "${src}" 2>/dev/null | sed -e '
+ /\//!d;
+ /linux-gate/d;
+ /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};
+ s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do
+
+ # Try to use non-optimised libraries where possible.
+ # We assume that all HWCAP libraries will be in tls,
+ # sse2, vfp or neon.
+ nonoptlib=$(echo "${x}" | sed -e 's#/lib/\([^/]*/\)\?\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\1\3#')
+ nonoptlib=$(echo "${nonoptlib}" | sed -e 's#-linux-gnu/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#-linux-gnu/\2#')
+
+ if [ -e "${nonoptlib}" ]; then
+ x="${nonoptlib}"
+ fi
+
+ libname=$(basename "${x}")
+ dirname=$(dirname "${x}")
+
+ # FIXME inst_lib
+ mkdir -p "${DESTDIR}/${dirname}"
+ if [ ! -e "${DESTDIR}/${dirname}/${libname}" ]; then
+ cp -pL "${x}" "${DESTDIR}/${dirname}"
+ [ "${verbose}" = "y" ] && echo "Adding library ${x}" || true
+ fi
+ done
+}
+
+# Copy entire subtrees to the initramfs
+copy_modules_dir()
+{
+ local kmod exclude
+ local modules=
+ local dir="$1"
+ shift
+
+ if ! [ -d "${MODULESDIR}/${dir}" ]; then
+ return;
+ fi
+ if [ "${verbose}" = "y" ]; then
+ echo "Copying module directory ${dir}"
+ if [ $# -ge 1 ]; then
+ echo "(excluding $*)"
+ fi
+ fi
+ while [ $# -ge 1 ]; do
+ exclude="${exclude:-} -name $1 -prune -o "
+ shift
+ done
+ for kmod in $(find "${MODULESDIR}/${dir}" ${exclude:-} -name '*.ko' -printf '%f\n'); do
+ modules="$modules ${kmod%.ko}"
+ done
+ manual_add_modules $modules
+}
+
+# walk /sys for relevant modules
+sys_walk_mod_add()
+{
+ local driver_path module
+ device_path="$1"
+
+ while [ "${device_path}" != "/sys" ]; do
+ sys_walk_modalias ${device_path}
+ driver_path="$(readlink -f ${device_path}/driver/module)"
+ if [ -e "$driver_path" ]; then
+ module="$(basename $(readlink -f $driver_path))"
+ if [ -n "${module}" ]; then
+ force_load "${module}"
+ fi
+ fi
+ device_path="$(dirname ${device_path})"
+ done
+}
+
+# walk /sys for relevant modalias
+sys_walk_modalias()
+{
+ local device_path modalias
+
+ device_path="$(dirname "${1}")"
+ device_path="$(dirname "${device_path}")"
+ if [ -e "${device_path}/modalias" ]; then
+ modalias=$(cat "${device_path}/modalias")
+ fi
+
+ if [ -n "${modalias}" ]; then
+ force_load "${modalias}"
+ fi
+}
+
+# find and only copy root relevant modules
+dep_add_modules()
+{
+ local block minor root FSTYPE root_dev_path
+ local modules=
+
+ # require mounted sysfs
+ if [ ! -d /sys/devices/ ]; then
+ echo "mkinitramfs: MODULES dep requires mounted sysfs on /sys" >&2
+ exit 1
+ fi
+
+ # findout root block device + fstype
+ eval "$( mount | while read dev foo mp foo fs opts rest ; do \
+ [ "$mp" = "/" ] && [ "$fs" != "rootfs" ] \
+ && printf "root=$dev\nFSTYPE=$fs" \
+ && break; done)"
+
+ # On failure fallback to /proc/mounts if readable
+ if [ -z "$root" ] && [ -r /proc/mounts ]; then
+ eval "$(while read dev mp fs opts rest ; do \
+ [ "$mp" = "/" ] && [ "$fs" != "rootfs" ] \
+ && printf "root=$dev\nFSTYPE=$fs"\
+ && break; done < /proc/mounts)"
+ fi
+
+ # recheck root device
+ if [ -z "$root" ]; then
+ echo "mkinitramfs: failed to determine root device" >&2
+ echo "mkinitramfs: workaround is MODULES=most, check:" >&2
+ echo "grep -r MODULES /etc/initramfs-tools/" >&2
+ echo "" >&2
+ echo "Error please report bug on initramfs-tools" >&2
+ echo "Include the output of 'mount' and 'cat /proc/mounts'" >&2
+ exit 1
+ fi
+
+ # handle ubifs and return since ubifs root is a char device but
+ # most of the commands below only work with block devices.
+ if [ "${FSTYPE}" = "ubifs" ]; then
+ manual_add_modules "${FSTYPE}"
+ return
+ fi
+
+ if [ "${root}" = "/dev/root" ] ; then
+ root="/dev/disk/by-uuid/"$(blkid -o value -s UUID ${root}) 2>/dev/null
+ fi
+ root="$(readlink -f ${root})"
+
+ # do not trust mount, check superblock
+ eval "$(/usr/lib/klibc/bin/fstype ${root})"
+
+ # check that fstype rootfs recognition
+ if [ "${FSTYPE}" = "unknown" ]; then
+ FSTYPE=$(blkid -o value -s TYPE "${root}")
+ if [ -z "${FSTYPE}" ]; then
+ echo "mkinitramfs: unknown fstype on root ${root}" >&2
+ echo "mkinitramfs: workaround is MODULES=most" >&2
+ echo "Error please report bug on initramfs-tools" >&2
+ exit 1
+ fi
+ fi
+
+ # Add rootfs
+ modules="$modules ${FSTYPE}"
+
+ # lvm or luks root
+ if [ "${root#/dev/mapper/}" != "${root}" ] \
+ || [ "${root#/dev/dm-}" != "${root}" ]; then
+ minor=$((0x$(stat --format "%T" ${root}) % 256))
+ block=$(ls -1 /sys/block/dm-${minor}/slaves | head -n 1)
+ # lvm on luks or luks on lvm, possibly lvm snapshots
+ while [ "${block#dm-}" != "${block}" ]; do
+ block=$(ls -1 /sys/block/${block}/slaves | head -n 1)
+ done
+ # lvm on md or luks on md
+ if [ "${block#md}" != "${block}" ]; then
+ block=$(sed -ne 's/multipath/[/' -e 's/linear/[/' -e 's/raid[0-9][0-9]*/[/' -e 's/\([hs]d[a-z][a-z]*\)[0-9][0-9]*/\1/g' -e '/^'${block}' :/s/^[^[]*\[ \([^\[]*\)\[.*$/\1/p' </proc/mdstat)
+ fi
+ # luks or lvm on cciss or ida
+ if [ "${block#cciss}" != "${block}" ] \
+ || [ "${block#ida}" != "${block}" ]; then
+ block="${block%p*}"
+ else
+ block=${block%%[0-9]*}
+ fi
+ # md root new naming scheme /dev/md/X
+ elif [ "${root#/dev/md/}" != "${root}" ]; then
+ root=${root#/dev/md/}
+ # strip partion number
+ root=${root%%p[0-9]*}
+ # drop the partition number only for sdX and hdX devices
+ # and keep it for other devices like loop#, dm-# devices
+ block=$(sed -ne 's/multipath/[/' -e 's/linear/[/' -e 's/raid[0-9][0-9]*/[/' -e 's/\([hs]d[a-z][a-z]*\)[0-9][0-9]*/\1/g' -e '/^md'$root' :/s/^[^[]*\[ \([^\[]*\)\[.*$/\1/p' </proc/mdstat)
+ # md root /dev/mdX
+ elif [ "${root#/dev/md}" != "${root}" ]; then
+ root=${root#/dev/md}
+ # strip partion number
+ root=${root%%p[0-9]*}
+ # drop the partition number only for sdX and hdX devices
+ # and keep it for other devices like loop#, dm-# devices
+ block=$(sed -ne 's/multipath/[/' -e 's/linear/[/' -e 's/raid[0-9][0-9]*/[/' -e 's/\([hs]d[a-z][a-z]*\)[0-9][0-9]*/\1/g' -e '/^md'$root' :/s/^[^[]*\[ \([^\[]*\)\[.*$/\1/p' </proc/mdstat)
+ # cciss device
+ elif [ "${root#/dev/cciss/}" != "${root}" ]; then
+ block=${root#/dev/cciss/*}
+ block="cciss!${block%p*}"
+ # ida device
+ elif [ "${root#/dev/ida/}" != "${root}" ]; then
+ block=${root#/dev/ida/*}
+ block="ida!${block%p*}"
+ # loop root /dev/loopX
+ elif [ "${root#/dev/loop}" != "${root}" ]; then
+ root=${root#/dev/}
+ block=$(losetup -a \
+ | awk "/${root}/{print substr(\$3, 7, 3); exit}")
+ # Xen virtual device /dev/xvdX
+ elif [ "${root#/dev/xvd}" != "${root}" ]; then
+ block=${root#/dev/}
+ # Xen has a mode where only the individual partitions are
+ # registered with the kernel as well as the usual full disk
+ # with partition table scheme.
+ if [ ! -e /sys/block/${block} ] ; then
+ block=${block%%[0-9]*}
+ fi
+ # mmc root /dev/mmcblkXpX
+ elif [ "${root#/dev/mmcblk}" != "${root}" ]; then
+ block=${root#/dev/}
+ block=${block%%p[0-9]*}
+
+ # DAC960 - good old mylex raid - root dev format /dev/rd/cXdXpX
+ elif [ "${root#/dev/rd/c}" != "${root}" ]; then
+ block="rd!c${root#/dev/rd/c}"
+ block=${block%%p[0-9]*}
+
+ # etherd device
+ elif [ "${root#/dev/etherd/}" != "${root}" ]; then
+ block=${root#/dev/etherd/*}
+ block="etherd!${block%p*}"
+ # classical root device
+ else
+ block=${root#/dev/}
+ block=${block%%[0-9]*}
+ fi
+
+ # Error out if /sys lack block dev
+ if [ -z "${block}" ] || [ ! -e /sys/block/${block} ]; then
+ echo "mkinitramfs: for root ${root} missing ${block} /sys/block/ entry" >&2
+ echo "mkinitramfs: workaround is MODULES=most" >&2
+ echo "mkinitramfs: Error please report the bug" >&2
+ exit 1
+ fi
+
+ # sys walk ATA
+ root_dev_path=$(readlink -f /sys/block/${block}/device)
+ sys_walk_mod_add ${root_dev_path}
+
+ # catch old-style IDE
+ if [ -e /sys/bus/ide/devices/ ]; then
+ sys_walk_modalias ${root_dev_path}
+ modules="$modules ide-gd_mod ide-cd"
+ fi
+
+ if [ -e /sys/bus/scsi/devices/ ]; then
+ modules="$modules sd_mod"
+ fi
+
+ if [ -e /sys/bus/mmc/devices/ ]; then
+ modules="$modules mmc_block"
+ fi
+
+ if [ -e /sys/bus/virtio ] ; then
+ modules="$modules virtio_pci"
+ fi
+
+ if [ -e /sys/bus/i2o/devices/ ]; then
+ force_load i2o_block
+ force_load i2o_config
+ fi
+
+ if [ -e /sys/bus/ps3_system_bus/ ]; then
+ modules="$modules ps3disk ps3rom ps3-gelic ps3_sys_manager"
+ fi
+
+ if [ -e /sys/bus/vio/ ]; then
+ modules="$modules sunvnet sunvdc"
+ fi
+
+ manual_add_modules $modules
+}
+
+
+# The modules "most" classes added per default to the initramfs
+auto_add_modules()
+{
+ local arg
+ local modules=
+
+ if [ "$#" -eq 0 ] ; then
+ set -- base net ide scsi block ata i2o dasd ieee1394 firewire mmc usb_storage
+ fi
+
+ for arg in "$@" ; do
+ case "$arg" in
+ base)
+ modules="$modules ehci-hcd ohci-hcd uhci-hcd usbhid"
+ modules="$modules xhci xhci-hcd"
+ modules="$modules hid-apple hid-cherry hid-logitech"
+ modules="$modules hid-logitech-dj"
+ modules="$modules hid-microsoft hid-sunplus"
+ modules="$modules btrfs ext2 ext3 ext4 ext4dev "
+ modules="$modules isofs jfs nfs reiserfs udf xfs"
+ modules="$modules af_packet atkbd i8042 virtio_pci"
+ ;;
+ net)
+ copy_modules_dir kernel/drivers/net \
+ appletalk arcnet bonding can hamradio irda \
+ pcmcia tokenring usb wan wimax wireless
+ ;;
+ ide)
+ copy_modules_dir kernel/drivers/ide
+ ;;
+ mmc)
+ copy_modules_dir kernel/drivers/mmc
+ ;;
+ scsi)
+ copy_modules_dir kernel/drivers/scsi
+ modules="$modules mptfc mptsas mptscsih mptspi zfcp"
+ ;;
+ ata)
+ copy_modules_dir kernel/drivers/ata
+ ;;
+ block)
+ copy_modules_dir kernel/drivers/block
+ ;;
+ ubi)
+ modules="$modules deflate zlib lzo ubi ubifs"
+ ;;
+ ieee1394)
+ modules="$modules ohci1394 sbp2"
+ ;;
+ firewire)
+ modules="$modules firewire-ohci firewire-sbp2"
+ ;;
+ i2o)
+ modules="$modules i2o_block"
+ ;;
+ dasd)
+ modules="$modules dasd_diag_mod dasd_eckd_mod dasd_fba_mod"
+ ;;
+ usb_storage)
+ copy_modules_dir kernel/drivers/usb/storage
+ ;;
+ esac
+ done
+
+ manual_add_modules $modules
+}
+
+# 'depmod' only looks at symbol dependencies; there is no way for
+# modules to declare explicit dependencies through module information,
+# so dependencies on e.g. crypto providers are hidden. Until this is
+# fixed, we need to handle those hidden dependencies.
+hidden_dep_add_modules()
+{
+ local modules=
+ for dep in "lib/libcrc32c crc32c" "fs/ubifs/ubifs deflate zlib lzo"; do
+ set -- $dep
+ if [ -f "${DESTDIR}/lib/modules/${version}/kernel/$1.ko" ]; then
+ shift
+ modules="$modules $@"
+ fi
+ done
+ manual_add_modules $modules
+}
+
+# mkinitramfs help message
+usage()
+{
+ cat >&2 << EOF
+
+Usage: ${0} [OPTION]... -o outfile [version]
+
+Options:
+ -c compress Override COMPRESS setting in initramfs.conf.
+ -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 initramfs.conf.
+
+See mkinitramfs(8) for further details.
+EOF
+ exit 1
+
+}
+
+# cache boot scripts order
+cache_run_scripts()
+{
+ DESTDIR=${1}
+ scriptdir=${2}
+ initdir=${DESTDIR}${scriptdir}
+ [ ! -d ${initdir} ] && return
+
+ runlist=$(get_prereq_pairs | tsort)
+ for crs_x in ${runlist}; do
+ [ -f ${initdir}/${crs_x} ] || continue
+ echo "${scriptdir}/${crs_x}" >> ${initdir}/ORDER
+ echo "[ -e /conf/param.conf ] && . /conf/param.conf" >> ${initdir}/ORDER
+ done
+}
View
25 usr/share/initramfs-tools/hooks/busybox
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# busybox
+if [ "${BUSYBOX}" != "n" ] && [ -e ${BUSYBOXDIR}/busybox ]; then
+ . /usr/share/initramfs-tools/hook-functions
+ rm -f ${DESTDIR}/bin/sh
+ rm -f ${DESTDIR}/bin/busybox
+ copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
+ ln -s busybox ${DESTDIR}/bin/sh
+fi
View
62 usr/share/initramfs-tools/hooks/keymap
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# Hook to load keymaps into the initramfs if requested by KEYMAP="y"
+if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then
+ exit 0
+fi
+
+# Step 1 - Basic tools
+if [ ! -x /bin/loadkeys ] ||
+! ( [ -r /etc/console/boottime.kmap.gz ] \
+ || [ -r /etc/console-setup/cached.kmap.gz ] ); then
+ exit 0
+fi
+
+. /usr/share/initramfs-tools/hook-functions
+copy_exec /bin/loadkeys /bin
+
+if [ -e /etc/console-setup/cached.kmap.gz ]; then
+ cp /etc/console-setup/cached.kmap.gz ${DESTDIR}/etc/boottime.kmap.gz
+else
+ cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/
+fi
+
+# Step 2 - Check for UTF8 console
+if [ ! -x /usr/bin/kbd_mode ]; then
+ exit 0
+fi
+
+if [ -r /etc/environment ]; then
+ env="/etc/environment"
+elif [ -r /etc/default/locale ]; then
+ env="/etc/default/locale"
+else
+ exit 0
+fi
+
+for var in LANG LC_ALL LC_CTYPE; do
+ value=$(egrep "^[^#]*${var}=" $env | tail -n1 | cut -d= -f2)
+ eval $var=$value
+done
+
+charmap=$(LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap)
+if [ "$charmap" = "UTF-8" ]; then
+ copy_exec /usr/bin/kbd_mode /bin
+fi
+exit 0
+
View
33 usr/share/initramfs-tools/hooks/klibc
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# klibc
+cp -pnL /usr/lib/klibc/bin/* ${DESTDIR}/bin
+cp -pL /lib/klibc-*.so ${DESTDIR}/lib
+rm -f ${DESTDIR}/bin/kinit* ${DESTDIR}/bin/zcat
+if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
+ if [ -x ${DESTDIR}/bin/sh.shared ]; then
+ # Some platforms build a shared klibc/sh:
+ mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh
+ elif [ -x /usr/lib/klibc/bin/sh ]; then
+ # Others build a static version instead:
+ cp -pL /usr/lib/klibc/bin/sh ${DESTDIR}/bin/sh
+ fi
+else
+ # Nobody wanted it, so save a tiny bit of space:
+ rm -f ${DESTDIR}/bin/sh.shared
+fi
View
117 usr/share/initramfs-tools/hooks/plymouth
@@ -0,0 +1,117 @@
+#!/bin/sh
+
+set -e
+
+PREREQ=""
+
+prereqs()
+{
+ echo "${PREREQ}"
+}
+
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+
+THEME="$(/usr/sbin/plymouth-set-default-theme || true)"
+THEMES="/usr/share/plymouth/themes"
+
+if [ -n "${THEME}" ]
+then
+ THEME="${THEMES}/${THEME}/${THEME}.plymouth"
+else
+ exit 0
+fi
+
+PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
+
+case "$(basename ${THEME} .plymouth)" in
+ text)
+ PLUGINS="details.so text.so"
+ ;;
+
+ *)
+ PLUGINS="details.so text.so label.so"
+ ;;
+esac
+
+MODULE="${PLUGIN_PATH}/$(sed -n 's/^ModuleName=\(.*\)/\1/p' ${THEME}).so"
+
+# copy plugin and images for current theme
+copy_exec "${MODULE}"
+mkdir -p "${DESTDIR}/${THEMES}"
+IMAGES="$(sed -n 's/^ImageDir=\(.*\)/\1/p' ${THEME})"
+# No images in text mode:
+if [ -n "${IMAGES}" ]
+then
+ cp -r "${IMAGES}" "${DESTDIR}/${THEMES}"
+fi
+
+# copy binaries and base plugins
+copy_exec /bin/plymouth
+copy_exec /sbin/plymouthd
+
+for PLUGIN in ${PLUGINS}
+do
+ copy_exec ${PLUGIN_PATH}/${PLUGIN}
+done
+
+# copy base themes and logo
+cp -a "${THEMES}/details" "${DESTDIR}/${THEMES}"
+cp -a "${THEMES}/text" "${DESTDIR}/${THEMES}"
+cp /etc/progress_version "${DESTDIR}/etc"
+
+case "$(basename ${THEME} .plymouth)" in
+ text)
+
+ ;;
+
+ *)
+ cp /usr/share/plymouth/debian-logo.png "${DESTDIR}/usr/share/plymouth"
+
+ # copy files for font rendering
+ mkdir -p "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
+ mkdir -p "${DESTDIR}/etc/fonts/conf.d"
+ mkdir -p "${DESTDIR}/var/cache/fontconfig"
+ cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
+ cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
+ cp -a /etc/fonts/fonts.conf "${DESTDIR}/etc/fonts"
+ cp -rL /etc/fonts/conf.d/60-latin.conf "${DESTDIR}/etc/fonts/conf.d"
+ if [ -e /usr/lib/pango/1.6.0/module-files.d/libpango1.0-0.modules ]
+ then
+ # pre-multiarch fallback
+ PANGO_DIR=/usr/lib/pango/1.6.0
+ else
+ PANGO_DIR=/usr/lib//pango/1.6.0
+ fi
+ mkdir -p "${DESTDIR}${PANGO_DIR}/module-files.d"
+ mkdir -p "${DESTDIR}${PANGO_DIR}/modules"
+ cp ${PANGO_DIR}/module-files.d/libpango1.0-0.modules ${DESTDIR}${PANGO_DIR}/module-files.d/
+ copy_exec ${PANGO_DIR}/modules/pango-basic-fc.so
+
+ # copy renderers
+ copy_exec /usr/lib/plymouth/renderers/frame-buffer.so
+ copy_exec /usr/lib/plymouth/renderers/drm.so
+
+ # add drm/fb modules
+ manual_add_modules intel-agp
+ manual_add_modules ati-agp
+ manual_add_modules i915
+ manual_add_modules radeon
+ ;;
+esac
+
+# copy config files
+mkdir -p "${DESTDIR}/etc/plymouth"
+
+if [ -r /etc/plymouth/plymouthd.conf ]
+then
+ cp -a /etc/plymouth/plymouthd.conf "${DESTDIR}/etc/plymouth/"
+fi
+
+cp -a /usr/share/plymouth/plymouthd.defaults "${DESTDIR}/usr/share/plymouth/"
View
68 usr/share/initramfs-tools/hooks/thermal
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# Hooks for loading thermal bits into the initramfs
+
+. /usr/share/initramfs-tools/hook-functions
+
+case "$DPKG_ARCH" in
+# copy the right modules
+powerpc|ppc64)
+
+ # Only G5 Mac machines need to load
+ # therm_pm72 or one of the windfarm_pm* modules.
+
+ [ -r /proc/cpuinfo ] || exit 0
+
+ MODEL="`grep model /proc/cpuinfo`"
+ MODEL="${MODEL##*: }"
+
+ case "$MODEL" in
+ RackMac3,1|PowerMac7,2|PowerMac7,3)
+ force_load therm_pm72
+ ;;
+ PowerMac8,1|PowerMac8,2)
+ force_load windfarm_pm81
+ ;;
+ PowerMac9,1)
+ force_load windfarm_pm91
+ ;;
+ PowerMac11,2)
+ force_load windfarm_pm112
+ ;;
+ PowerMac12,1)
+ force_load windfarm_pm121
+ ;;
+ *)
+ # No other machine needs windfarm_* modules on initrd.
+ exit 0
+ ;;
+ esac
+ manual_add_modules windfarm_core
+ manual_add_modules windfarm_cpufreq_clamp
+ manual_add_modules windfarm_lm75_sensor
+ manual_add_modules windfarm_max6690_sensor
+ manual_add_modules windfarm_pid
+ manual_add_modules windfarm_smu_controls
+ manual_add_modules windfarm_smu_sat
+ manual_add_modules windfarm_smu_sensors
+ ;;
+i386|amd64|ia64)
+ manual_add_modules fan
+ manual_add_modules thermal
+ ;;
+esac
View
329 usr/share/initramfs-tools/init
@@ -0,0 +1,329 @@
+#!/bin/sh
+
+[ -d /dev ] || mkdir -m 0755 /dev
+[ -d /root ] || mkdir -m 0700 /root
+[ -d /sys ] || mkdir /sys
+[ -d /proc ] || mkdir /proc
+[ -d /tmp ] || mkdir /tmp
+mkdir -p /var/lock
+mount -t sysfs -o nodev,noexec,nosuid sysfs /sys
+mount -t proc -o nodev,noexec,nosuid proc /proc
+
+# Note that this only becomes /dev on the real filesystem if udev's scripts
+# are used; which they will be, but it's worth pointing out
+tmpfs_size="10M"
+if [ -e /etc/udev/udev.conf ]; then
+ . /etc/udev/udev.conf
+fi
+if ! mount -t devtmpfs -o size=$tmpfs_size,mode=0755 udev /dev; then
+ echo "W: devtmpfs not available, falling back to tmpfs for /dev"
+ mount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev
+ [ -e /dev/console ] || mknod -m 0600 /dev/console c 5 1
+ [ -e /dev/null ] || mknod /dev/null c 1 3
+fi
+mkdir /dev/pts
+mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true
+mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run
+mkdir -m 0755 /run/initramfs
+
+# Export the dpkg architecture
+export DPKG_ARCH=
+. /conf/arch.conf
+
+# Set modprobe env
+export MODPROBE_OPTIONS="-qb"
+
+# Export relevant variables
+export ROOT=
+export ROOTDELAY=
+export ROOTFLAGS=
+export ROOTFSTYPE=
+export IP=
+export BOOT=
+export BOOTIF=
+export UBIMTD=
+export break=
+export init=/sbin/init
+export quiet=n
+export readonly=y
+export rootmnt=/root
+export debug=
+export panic=
+export blacklist=
+export resume=
+export resume_offset=
+export init_option=
+
+# Bring in the main config
+. /conf/initramfs.conf
+for conf in conf/conf.d/*; do
+ [ -f ${conf} ] && . ${conf}
+done
+. /scripts/functions
+
+# Parse command line options
+for x in $(cat /proc/cmdline); do
+ case $x in
+ init=*)
+ init=${x#init=}
+ ;;
+ root=*)
+ ROOT=${x#root=}
+ case $ROOT in
+ LABEL=*)
+ ROOT="${ROOT#LABEL=}"
+
+ # support any / in LABEL= path (escape to \x2f)
+ case "${ROOT}" in
+ */*)
+ if command -v sed >/dev/null 2>&1; then
+ ROOT="$(echo ${ROOT} | sed 's,/,\\x2f,g')"
+ else
+ if [ "${ROOT}" != "${ROOT#/}" ]; then
+ ROOT="\x2f${ROOT#/}"
+ fi
+ if [ "${ROOT}" != "${ROOT%/}" ]; then
+ ROOT="${ROOT%/}\x2f"
+ fi
+ IFS='/'
+ newroot=
+ for s in $ROOT; do
+ newroot="${newroot:+${newroot}\\x2f}${s}"
+ done
+ unset IFS
+ ROOT="${newroot}"
+ fi
+ esac
+ ROOT="/dev/disk/by-label/${ROOT}"
+ ;;
+ UUID=*)
+ ROOT="/dev/disk/by-uuid/${ROOT#UUID=}"
+ ;;
+ /dev/nfs)
+ [ -z "${BOOT}" ] && BOOT=nfs
+ ;;
+ esac
+ ;;
+ rootflags=*)
+ ROOTFLAGS="-o ${x#rootflags=}"
+ ;;
+ rootfstype=*)
+ ROOTFSTYPE="${x#rootfstype=}"
+ ;;
+ rootdelay=*)
+ ROOTDELAY="${x#rootdelay=}"
+ case ${ROOTDELAY} in
+ *[![:digit:].]*)
+ ROOTDELAY=
+ ;;
+ esac
+ ;;
+ nfsroot=*)
+ NFSROOT="${x#nfsroot=}"
+ ;;
+ ip=*)
+ IP="${x#ip=}"
+ ;;
+ boot=*)
+ BOOT=${x#boot=}
+ ;;
+ ubi.mtd=*)
+ UBIMTD=${x#ubi.mtd=}
+ ;;
+ resume=*)
+ RESUME="${x#resume=}"
+ ;;
+ resume_offset=*)
+ resume_offset="${x#resume_offset=}"
+ ;;
+ noresume)
+ noresume=y
+ ;;
+ panic=*)
+ panic="${x#panic=}"
+ case ${panic} in
+ *[![:digit:].]*)
+ panic=
+ ;;
+ esac
+ ;;
+ quiet)
+ quiet=y
+ init_option=quiet
+ ;;
+ ro)
+ readonly=y
+ ;;
+ rw)
+ readonly=n
+ ;;
+ debug)
+ debug=y
+ quiet=n
+ exec >/run/initramfs/initramfs.debug 2>&1
+ set -x
+ ;;
+ debug=*)
+ debug=y
+ quiet=n
+ set -x
+ ;;
+ break=*)
+ break=${x#break=}
+ ;;
+ break)
+ break=premount
+ ;;
+ blacklist=*)
+ blacklist=${x#blacklist=}
+ ;;
+ netconsole=*)
+ netconsole=${x#netconsole=}
+ ;;
+ BOOTIF=*)
+ BOOTIF=${x#BOOTIF=}
+ ;;
+ esac
+done
+
+# Default to BOOT=local if no boot script defined.
+if [ -z "${BOOT}" ]; then
+ BOOT=local
+fi
+
+if [ -n "${noresume}" ]; then
+ export noresume
+ unset resume
+else
+ resume=${RESUME:-}
+fi
+
+maybe_break top
+
+# Don't do log messages here to avoid confusing graphical boots
+run_scripts /scripts/init-top
+
+maybe_break modules
+[ "$quiet" != "y" ] && log_begin_msg "Loading essential drivers"
+load_modules
+[ "$quiet" != "y" ] && log_end_msg
+
+[ -n "${netconsole}" ] && modprobe netconsole netconsole="${netconsole}"
+
+maybe_break premount
+[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-premount"
+run_scripts /scripts/init-premount
+[ "$quiet" != "y" ] && log_end_msg
+
+maybe_break mount
+log_begin_msg "Mounting root file system"
+. /scripts/${BOOT}
+parse_numeric ${ROOT}
+maybe_break mountroot
+mountroot
+log_end_msg
+
+maybe_break bottom
+[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom"
+run_scripts /scripts/init-bottom
+[ "$quiet" != "y" ] && log_end_msg
+
+# Preserve information on old systems without /run on the rootfs
+if [ -d ${rootmnt}/run ]; then
+ mount -n -o move /run ${rootmnt}/run
+else
+ # The initramfs udev database must be migrated:
+ if [ -d /run/udev ] && [ ! -d /dev/.udev ]; then
+ mv /run/udev /dev/.udev
+ fi
+ # The initramfs debug info must be migrated:
+ if [ -d /run/initramfs ] && [ ! -d /dev/.initramfs ]; then
+ mv /run/initramfs /dev/.initramfs
+ fi
+ umount /run
+fi
+
+validate_init() {
+ checktarget="${1}"
+
+ # Work around absolute symlinks
+ if [ -d "${rootmnt}" ] && [ -h "${rootmnt}${checktarget}" ]; then
+ case $(readlink "${rootmnt}${checktarget}") in /*)
+ checktarget="$(chroot ${rootmnt} readlink ${checktarget})"
+ ;;
+ esac
+ fi
+
+ # Make sure the specified init can be executed
+ if [ ! -x "${rootmnt}${checktarget}" ]; then
+ return 1
+ fi
+
+ # Upstart uses /etc/init as configuration directory :-/
+ if [ -d "${rootmnt}${checktarget}" ]; then
+ return 1
+ fi
+}
+
+# Check init bootarg
+if [ -n "${init}" ]; then
+ if ! validate_init "$init"; then
+ echo "Target filesystem doesn't have requested ${init}."
+ init=
+ fi
+fi
+
+# Common case: /sbin/init is present
+if [ ! -x "${rootmnt}/sbin/init" ]; then
+ # ... if it's not available search for valid init
+ if [ -z "${init}" ] ; then
+ for inittest in /sbin/init /etc/init /bin/init /bin/sh; do
+ if validate_init "${inittest}"; then
+ init="$inittest"
+ break
+ fi
+ done
+ fi
+
+ # No init on rootmount
+ if ! validate_init "${init}" ; then
+ panic "No init found. Try passing init= bootarg."
+ fi
+fi
+
+maybe_break init
+
+# don't leak too much of env - some init(8) don't clear it
+# (keep init, rootmnt)
+unset debug
+unset MODPROBE_OPTIONS
+unset DPKG_ARCH
+unset ROOTFLAGS
+unset ROOTFSTYPE
+unset ROOTDELAY
+unset ROOT
+unset IP
+unset BOOT
+unset BOOTIF
+unset UBIMTD
+unset blacklist
+unset break
+unset noresume
+unset panic
+unset quiet
+unset readonly
+unset resume
+unset resume_offset
+
+# Move virtual filesystems over to the real filesystem
+mount -n -o move /sys ${rootmnt}/sys
+mount -n -o move /proc ${rootmnt}/proc
+
+# Chain to real filesystem
+if command -v switch_root >/dev/null 2>&1; then
+ exec switch_root ${rootmnt} ${init} ${init_option} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console
+elif command -v run-init >/dev/null 2>&1; then
+ exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console
+fi
+echo "Something went badly wrong in the initramfs."
+panic "Please file a bug on initramfs-tools."
View
11 usr/share/initramfs-tools/modules
@@ -0,0 +1,11 @@
+# List of modules that you want to include in your initramfs.
+# They will be loaded at boot time in the order below.
+#
+# Syntax: module_name [args ...]
+#
+# You must run update-initramfs(8) to effect this change.
+#
+# Examples:
+#
+# raid1
+# sd_mod
View
425 usr/share/initramfs-tools/scripts/functions
@@ -0,0 +1,425 @@
+# -*- shell-script -*-
+
+_log_msg()
+{
+ if [ "$quiet" = "y" ]; then return; fi
+ printf "$@"
+}
+
+log_success_msg()
+{
+ _log_msg "Success: $@\n"
+}
+
+log_failure_msg()
+{
+ _log_msg "Failure: $@\n"
+}
+
+log_warning_msg()
+{
+ _log_msg "Warning: $@\n"
+}
+
+log_begin_msg()
+{
+ _log_msg "Begin: $@ ... "
+}
+
+log_end_msg()
+{
+ _log_msg "done.\n"
+}
+
+panic()
+{
+ if command -v chvt >/dev/null 2>&1; then
+ chvt 1
+ fi
+
+ echo "$@"
+ # Disallow console access
+ if [ -n "${panic}" ]; then
+ echo "Rebooting automatically due to panic= boot argument"
+ sleep ${panic}
+ reboot
+ fi
+ modprobe -v i8042 || true
+ modprobe -v atkbd || true
+ modprobe -v ehci-hcd || true
+ modprobe -v uhci-hcd || true
+ modprobe -v ohci-hcd || true
+ modprobe -v usbhid || true
+ REASON="$@" PS1='(initramfs) ' /bin/sh -i </dev/console >/dev/console 2>&1
+}
+
+maybe_break()
+{
+ if [ "${break:-}" = "$1" ]; then
+ panic "Spawning shell within the initramfs"
+ fi
+}
+
+render()
+{
+ eval "echo -n \${$@}"
+}
+
+set_initlist()
+{
+ unset initlist
+ for si_x in ${initdir}/*; do
+ # skip empty dirs without warning
+ [ "${si_x}" = "${initdir}/*" ] && return
+
+ # only allow variable name chars
+ case ${si_x#${initdir}/} in
+ *[![:alnum:]\._-]*)
+ [ "${verbose}" = "y" ] \
+ && echo "$si_x ignored: not alphanumeric or '_' file" >&2
+ continue
+ ;;
+ esac
+
+ # skip non executable scripts
+ if [ ! -x ${si_x} ]; then
+ [ "${verbose}" = "y" ] \
+ && echo "$si_x ignored: not executable" >&2
+ continue
+ fi
+
+ # skip directories
+ if [ -d ${si_x} ]; then
+ [ "${verbose}" = "y" ] \
+ && echo "$si_x ignored: a directory" >&2
+ continue
+ fi
+
+ # skip bad syntax
+ if ! sh -n ${si_x} ; then
+ [ "${verbose}" = "y" ] \
+ && echo "$si_x ignored: bad syntax" >&2
+ continue
+ fi
+
+ initlist="${initlist:-} ${si_x#${initdir}/}"
+ done
+}
+
+reduce_satisfied()
+{
+ deplist="$(render array_${1})"
+ unset tmpdeplist
+ for rs_y in ${deplist}; do
+ # only allow variable name chars
+ case ${rs_y} in
+ *[![:alnum:]\._-]*)
+ continue
+ ;;
+ esac
+ # skip non executable scripts
+ [ ! -x ${initdir}/${rs_y} ] && continue
+ # skip directories
+ [ -d ${initdir}/${rs_y} ] && continue
+ # skip bad syntax
+ sh -n ${initdir}/${rs_y} || continue
+
+ tmpdeplist="${tmpdeplist} ${rs_y}"
+ done
+ deplist=${tmpdeplist}
+ for rs_x in ${runlist}; do
+ pop_list_item ${rs_x} ${deplist}
+ deplist=${tmppop}
+ done
+ eval array_${1}=\"${deplist}\"
+}
+
+get_prereqs()
+{
+ set_initlist
+ for gp_x in ${initlist}; do
+ tmp=$(${initdir}/${gp_x} prereqs)
+ eval array_${gp_x}=\"${tmp}\"
+ done
+}
+
+count_unsatisfied()
+{
+ set -- ${@}
+ return ${#}
+}
+
+# Removes $1 from initlist
+pop_list_item()
+{
+ item=${1}
+ shift
+ set -- ${@}
+ unset tmppop
+ # Iterate
+ for pop in ${@}; do
+ if [ ${pop} = ${item} ]; then
+ continue
+ fi
+ tmppop="${tmppop} ${pop}"
+ done
+
+}
+
+# This function generates the runlist, so we clear it first.
+reduce_prereqs()
+{
+ unset runlist
+ set -- ${initlist}
+ i=$#
+ # Loop until there's no more in the queue to loop through
+ while [ ${i} -ne 0 ]; do
+ oldi=${i}
+ for rp_x in ${initlist}; do
+ reduce_satisfied ${rp_x}
+ count_unsatisfied $(render array_${rp_x})
+ cnt=${?}
+ if [ ${cnt} -eq 0 ]; then
+ runlist="${runlist} ${rp_x}"
+ pop_list_item ${rp_x} ${initlist}
+ initlist=${tmppop}
+ i=$((${i} - 1))
+ fi
+ done
+ if [ ${i} -eq ${oldi} ]; then
+ panic "PANIC: Circular dependancy. Exiting."
+ fi
+ done
+}
+
+get_prereq_pairs()
+{
+ set_initlist
+ for gp_x in ${initlist:-}; do
+ echo ${gp_x} ${gp_x}
+ prereqs=$(${initdir}/${gp_x} prereqs)
+ for prereq in ${prereqs}; do
+ echo ${prereq} ${gp_x}
+ done
+ done
+}
+
+call_scripts()
+{
+ set -e
+ for cs_x in ${runlist}; do
+ [ -f ${initdir}/${cs_x} ] || continue
+ # mkinitramfs verbose output
+ if [ "${verbose}" = "y" ]; then
+ echo "Calling hook ${cs_x}"
+ fi
+ ${initdir}/${cs_x} && ec=$? || ec=$?
+ # allow hooks to abort build:
+ if [ "$ec" -ne 0 ]; then
+ echo "E: ${initdir}/${cs_x} failed with return $ec."
+ # only errexit on mkinitramfs
+ [ -n "${version}" ] && exit $ec
+ fi
+ # allow boot scripts to modify exported boot parameters
+ if [ -e /conf/param.conf ]; then
+ . /conf/param.conf
+ fi
+ done
+ set +e
+}
+
+run_scripts()
+{
+ initdir=${1}
+ [ ! -d ${initdir} ] && return
+
+ if [ -f ${initdir}/ORDER ]; then
+ . ${initdir}/ORDER
+ elif command -v tsort >/dev/null 2>&1; then
+ runlist=$(get_prereq_pairs | tsort)
+ call_scripts ${2:-}
+ else
+ get_prereqs
+ reduce_prereqs
+ call_scripts
+ fi
+}
+
+# Load custom modules first
+load_modules()
+{
+ if [ -e /conf/modules ]; then
+ cat /conf/modules | while read m; do
+ # Skip empty lines
+ if [ -z "$m" ]; then
+ continue
+ fi
+ # Skip comments - d?ash removes whitespace prefix
+ com=$(printf "%.1s" "${m}")
+ if [ "$com" = "#" ]; then
+ continue
+ fi
+ modprobe $m
+ done
+ fi
+}
+
+# lilo compatibility
+parse_numeric() {
+ case $1 in
+ "")
+ return
+ ;;
+ /*)
+ return
+ ;;
+ [0-9]*:[0-9]*)
+ minor=$(( ${1#*:} ))
+ major=$(( ${1%:*} ))
+ ;;
+ [A-Fa-f0-9]*)
+ value=$(( 0x${1} ))
+ minor=$(( ${value} % 256 ))
+ major=$(( ${value} / 256 ))
+ ;;
+ *)
+ return
+ ;;
+ esac
+
+ if command -v udevd >/dev/null 2>&1; then
+ ROOT=/dev/block/${major}:${minor}
+ else
+ mknod -m 600 /dev/root b ${major} ${minor}
+ ROOT=/dev/root
+ fi
+}
+
+# Parameter: device node to check
+# Echos fstype to stdout
+# Return value: indicates if an fs could be recognized
+get_fstype ()
+{
+ local FS FSTYPE FSSIZE RET
+ FS="${1}"
+
+ # blkid has a more complete list of file systems,
+ # but fstype is more robust
+ eval $(fstype "${FS}" 2> /dev/null)
+ if [ "$FSTYPE" = "unknown" ] && command -v blkid >/dev/null 2>&1 ; then
+ FSTYPE=$(blkid -o value -s TYPE "${FS}")
+ elif [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then
+ FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null)
+ fi
+ RET=$?
+
+ if [ -z "${FSTYPE}" ]; then
+ FSTYPE="unknown"
+ fi
+
+ echo "${FSTYPE}"
+ return ${RET}
+}
+
+configure_networking()
+{
+ if [ -n "${BOOTIF}" ]; then
+ # pxelinux sets BOOTIF to a value based on the mac address of the
+ # network card used to PXE boot, so use this value for DEVICE rather
+ # than a hard-coded device name from initramfs.conf. this facilitates
+ # network booting when machines may have multiple network cards.
+ # pxelinux sets BOOTIF to 01-$mac_address
+
+ # strip off the leading "01-", which isn't part of the mac
+ # address
+ temp_mac=${BOOTIF#*-}
+
+ # convert to typical mac address format by replacing "-" with ":"
+ bootif_mac=""
+ IFS='-'
+ for x in $temp_mac ; do
+ if [ -z "$bootif_mac" ]; then
+ bootif_mac="$x"
+ else
+ bootif_mac="$bootif_mac:$x"
+ fi
+ done
+ unset IFS
+
+ # look for devices with matching mac address, and set DEVICE to
+ # appropriate value if match is found.
+ for device in /sys/class/net/* ; do
+ if [ -f "$device/address" ]; then
+ current_mac=$(cat "$device/address")
+ if [ "$bootif_mac" = "$current_mac" ]; then
+ DEVICE=${device##*/}
+ break
+ fi
+ fi
+ done
+ fi
+
+ # networking already configured thus bail out
+ [ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ] && return 0
+
+ wait_for_udev 10
+
+ # support ip options see linux sources
+ # Documentation/filesystems/nfs/nfsroot.txt
+ # Documentation/frv/booting.txt
+
+ for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do
+
+ # The NIC is to be configured if this file does not exist.
+ # Ip-Config tries to create this file and when it succeds
+ # creating the file, ipconfig is not run again.
+ for x in /tmp/net-"${DEVICE}".conf /tmp/net-*.conf ; do
+ [ -e "$x" ] && break 2
+ done
+
+ case ${IP} in
+ none|off)
+ # Do nothing
+ ;;
+ ""|on|any)
+ # Bring up device
+ ipconfig -t ${ROUNDTTT} "${DEVICE}"
+ ;;
+ dhcp|bootp|rarp|both)
+ ipconfig -t ${ROUNDTTT} -c ${IP} -d "${DEVICE}"
+ ;;
+ *)
+ ipconfig -t ${ROUNDTTT} -d $IP
+
+ # grab device entry from ip option
+ NEW_DEVICE=${IP#*:*:*:*:*:*}
+ if [ "${NEW_DEVICE}" != "${IP}" ]; then
+ NEW_DEVICE=${NEW_DEVICE%:*}
+ else
+ # wrong parse, possibly only a partial string
+ NEW_DEVICE=
+ fi
+ if [ -n "${NEW_DEVICE}" ]; then
+ DEVICE="${NEW_DEVICE}"
+ fi
+ ;;
+ esac
+ done
+
+ # source ipconfig output
+ if [ -n "${DEVICE}" ]; then
+ # source specific bootdevice
+ . /tmp/net-${DEVICE}.conf
+ else
+ # source any interface...
+ # ipconfig should have quit after first response
+ . /tmp/net-*.conf
+ fi
+}
+
+# Wait for queued kernel/udev events
+wait_for_udev()
+{
+ command -v udevadm >/dev/null 2>&1 || return 0
+ udevadm settle ${1:+--timeout=$1}
+}
View
17 usr/share/initramfs-tools/scripts/init-bottom/plymouth
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+PREREQ="udev"
+
+prereqs()
+{
+ echo "${PREREQ}"
+}
+
+case ${1} in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+/bin/plymouth --newroot=${rootmnt}
View
39 usr/share/initramfs-tools/scripts/init-premount/plymouth
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+PREREQ="udev"
+
+prereqs()
+{
+ echo "${PREREQ}"
+}
+
+case ${1} in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+SPLASH="false"
+
+for ARGUMENT in $(cat /proc/cmdline)
+do
+ case "${ARGUMENT}" in
+ splash*)
+ SPLASH="true"
+ ;;
+
+ nosplash*)
+ SPLASH="false"
+ ;;
+ esac
+done
+
+if [ "${SPLASH}" = "true" ]
+then
+ modprobe i8042
+ modprobe atkbd
+
+ /sbin/plymouthd --mode=boot --attach-to-session
+ /bin/plymouth --show-splash
+fi
View
27 usr/share/initramfs-tools/scripts/init-top/all_generic_ide
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PREREQ=""
+prereqs()
+{
+ echo "$PREREQ"
+}
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+for x in $(cat /proc/cmdline); do
+ case ${x} in
+ all_generic_ide)
+ modprobe ata_generic all_generic_ide=1
+ ;;
+ all_generic_ide=*)
+ if [ ${x#all_generic_ide=} ]; then
+ modprobe ata_generic all_generic_ide=1
+ fi
+ ;;
+ esac
+done
View
25 usr/share/initramfs-tools/scripts/init-top/blacklist
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# sanity check
+[ -z "${blacklist}" ] && exit 0
+
+# write blacklist to modprobe.d
+IFS=','
+for b in ${blacklist}; do
+ echo "blacklist $b" >> /etc/modprobe.d/initramfs.conf
+done
View
27 usr/share/initramfs-tools/scripts/init-top/keymap
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PREREQ=""
+prereqs()
+{
+ echo "$PREREQ"
+}
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+OPTS="-q"
+
+# Should terminal be in UTF8 mode?
+if [ -x /bin/kbd_mode ]; then
+ /bin/kbd_mode -u
+ OPTS="${OPTS} -u"
+fi
+
+# Load custom keymap
+if [ -x /bin/loadkeys -a -r /etc/boottime.kmap.gz ]; then
+ loadkeys ${OPTS} /etc/boottime.kmap.gz
+fi
View
112 usr/share/initramfs-tools/scripts/local
@@ -0,0 +1,112 @@
+# Local filesystem mounting -*- shell-script -*-
+
+pre_mountroot()
+{
+ [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-top"
+ run_scripts /scripts/local-top
+ [ "$quiet" != "y" ] && log_end_msg
+
+ wait_for_udev 10
+
+ # Load ubi with the correct MTD partition and return since fstype
+ # doesn't work with a char device like ubi.
+ if [ -n "$UBIMTD" ]; then
+ modprobe ubi mtd=$UBIMTD
+ return
+ fi
+
+ # Don't wait for a root device that doesn't have a corresponding
+ # device in /dev (ie, mtd0)
+ if [ "${ROOT#/dev}" = "${ROOT}" ]; then
+ return
+ fi
+
+ # If the root device hasn't shown up yet, give it a little while
+ # to deal with removable devices
+ if [ ! -e "${ROOT}" ] || ! $(get_fstype "${ROOT}" >/dev/null); then
+ log_begin_msg "Waiting for root file system"
+
+ # Default delay is 30s
+ slumber=${ROOTDELAY:-30}
+
+ slumber=$(( ${slumber} * 10 ))
+ while [ ! -e "${ROOT}" ] \
+ || ! $(get_fstype "${ROOT}" >/dev/null); do
+ /bin/sleep 0.1
+ slumber=$(( ${slumber} - 1 ))
+ [ ${slumber} -gt 0 ] || break
+ done
+
+ if [ ${slumber} -gt 0 ]; then
+ log_end_msg 0
+ else
+ log_end_msg 1 || true
+ fi
+ fi
+
+ # We've given up, but we'll let the user fix matters if they can
+ while [ ! -e "${ROOT}" ]; do
+ # give hint about renamed root
+ case "${ROOT}" in
+ /dev/hd*)
+ suffix="${ROOT#/dev/hd}"
+ major="${suffix%[[:digit:]]}"
+ major="${major%[[:digit:]]}"
+ if [ -d "/sys/block/sd${major}" ]; then
+ echo "WARNING bootdevice may be renamed. Try root=/dev/sd${suffix}"
+ fi
+ ;;
+ /dev/sd*)
+ suffix="${ROOT#/dev/sd}"
+ major="${suffix%[[:digit:]]}"
+ major="${major%[[:digit:]]}"
+ if [ -d "/sys/block/hd${major}" ]; then
+ echo "WARNING bootdevice may be renamed. Try root=/dev/hd${suffix}"
+ fi
+ ;;
+ esac
+ echo "Gave up waiting for root device. Common problems:"
+ echo " - Boot args (cat /proc/cmdline)"
+ echo " - Check rootdelay= (did the system wait long enough?)"
+ echo " - Check root= (did the system wait for the right device?)"
+ echo " - Missing modules (cat /proc/modules; ls /dev)"
+ panic "ALERT! ${ROOT} does not exist. Dropping to a shell!"
+ done
+}
+
+mountroot()
+{
+ pre_mountroot
+
+ # Get the root filesystem type if not set
+ if [ -z "${ROOTFSTYPE}" ]; then
+ FSTYPE=$(get_fstype "${ROOT}")
+ else
+ FSTYPE=${ROOTFSTYPE}
+ fi
+
+ [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount"
+ run_scripts /scripts/local-premount
+ [ "$quiet" != "y" ] && log_end_msg
+
+ if [ "${readonly}" = "y" ]; then
+ roflag=-r
+ else
+ roflag=-w
+ fi
+
+ # FIXME This has no error checking
+ modprobe ${FSTYPE}
+
+ # FIXME This has no error checking
+ # Mount root
+ if [ "${FSTYPE}" != "unknown" ]; then
+ mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}
+ else
+ mount ${roflag} ${ROOTFLAGS} ${ROOT} ${rootmnt}
+ fi
+
+ [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom"
+ run_scripts /scripts/local-bottom
+ [ "$quiet" != "y" ] && log_end_msg
+}
View
63 usr/share/initramfs-tools/scripts/local-premount/resume
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+if [ -z "${resume}" ]; then
+ exit 0
+fi
+
+case $resume in
+LABEL=*)
+ resume="${resume#LABEL=}"
+
+ # support any / in LABEL= path (escape to \x2f)
+ case "${resume}" in
+ */*)
+ if command -v sed >/dev/null 2>&1; then
+ resume="$(echo ${resume} | sed 's,/,\\x2f,g')"
+ else
+ if [ "${resume}" != "${resume#/}" ]; then
+ resume="\x2f${resume#/}"
+ fi
+ if [ "${resume}" != "${resume%/}" ]; then
+ resume="${resume%/}\x2f"
+ fi
+ IFS='/'
+ newresume=
+ for s in $resume; do
+ newresume="${newresume:+${newresume}\\x2f}${s}"
+ done
+ unset IFS
+ resume="${newresume}"
+ fi
+ esac
+ resume="/dev/disk/by-label/${resume}"
+ ;;
+UUID=*)
+ resume="/dev/disk/by-uuid/${resume#UUID=}"
+ ;;
+esac
+
+[ ! -e "${resume}" ] && exit 0
+
+[ ! -e /sys/power/resume ] && exit 0
+
+# hardcode path, uswsusp ships an resume binary too
+if [ -n "${resume_offset}" ]; then
+ /bin/resume ${resume} ${resume_offset}
+else
+ /bin/resume ${resume}
+fi
View
80 usr/share/initramfs-tools/scripts/nfs
@@ -0,0 +1,80 @@
+# NFS filesystem mounting -*- shell-script -*-
+
+# FIXME This needs error checking
+
+retry_nr=0
+
+# parse nfs bootargs and mount nfs
+do_nfsmount()
+{
+
+ configure_networking
+
+ # get nfs root from dhcp
+ if [ "x${NFSROOT}" = "xauto" ]; then
+ # check if server ip is part of dhcp root-path
+ if [ "${ROOTPATH#*:}" = "${ROOTPATH}" ]; then
+ NFSROOT=${ROOTSERVER}:${ROOTPATH}
+ else
+ NFSROOT=${ROOTPATH}
+ fi
+
+ # nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
+ elif [ -n "${NFSROOT}" ]; then
+ # nfs options are an optional arg
+ if [ "${NFSROOT#*,}" != "${NFSROOT}" ]; then
+ NFSOPTS="-o ${NFSROOT#*,}"
+ fi
+ NFSROOT=${NFSROOT%%,*}
+ if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then
+ NFSROOT=${ROOTSERVER}:${NFSROOT}
+ fi
+ fi
+
+ if [ -z "${NFSOPTS}" ]; then
+ NFSOPTS="-o retrans=10"
+ fi
+
+ [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-premount"
+ run_scripts /scripts/nfs-premount
+ [ "$quiet" != "y" ] && log_end_msg
+
+ if [ ${readonly} = y ]; then
+ roflag="-o ro"
+ else
+ roflag="-o rw"
+ fi
+
+ nfsmount -o nolock ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt}
+}
+
+# NFS root mounting
+mountroot()
+{
+ [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top"
+ run_scripts /scripts/nfs-top
+ [ "$quiet" != "y" ] && log_end_msg
+
+ modprobe nfs
+ # For DHCP
+ modprobe af_packet
+
+ wait_for_udev 10
+
+ # Default delay is around 180s
+ delay=${ROOTDELAY:-180}
+
+ # loop until nfsmount succeeds
+ do_nfsmount
+ while [ ${retry_nr} -lt ${delay} ] && [ ! -e ${rootmnt}${init} ]; do
+ [ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount"
+ /bin/sleep 1
+ do_nfsmount
+ retry_nr=$(( ${retry_nr} + 1 ))
+ [ "$quiet" != "y" ] && log_end_msg
+ done
+
+ [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom"
+ run_scripts /scripts/nfs-bottom
+ [ "$quiet" != "y" ] && log_end_msg
+}
View
3,698 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.list
3,698 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
3,077 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.md5sums
3,077 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
712 var/lib/dpkg/info/linux-image-3.2.0-3artax1-686-pae.postinst
@@ -0,0 +1,712 @@
+#! /usr/bin/perl
+#
+use strict;
+use warnings;
+use Cwd 'abs_path';
+use Debconf::Client::ConfModule qw(:all);
+use POSIX ();
+version('2.0');
+my $capb = capb('backup', 'escape');
+
+$|=1;
+
+# Predefined values:
+my $version = "3.2.0-3artax1-686-pae";
+my $link_in_boot = "";
+my $no_symlink = "";
+my $do_symlink = "Yes"; # target machine defined
+my $kimage = "vmlinuz";
+my $initrd = "YES"; # initrd kernel
+my $mkimage = ""; # command to generate the initrd image
+my $use_hard_links = ''; # hardlinks do not work across fs boundaries
+my $postinst_hook = ''; #Normally we do not
+my $minimal_swap = ''; # Do not swap symlinks
+my $ignore_depmod_err = ''; # normally we do not
+my $kernel_arch = "x86";
+my $ramdisk = '';
+my $package_name = "linux-image-$version";
+
+#known variables
+my $image_dest = "/";
+my $realimageloc = "/boot/";
+my $have_conffile = "";
+
+my $modules_base = '/lib/modules';
+my $CONF_LOC = '/etc/kernel-img.conf';
+
+# Ignore all invocations except when called on to configure.
+exit 0 unless $ARGV[0] =~ /configure/;
+
+my $DEBUG = 0;
+
+# Do some preliminary sanity checks here to ensure we actually have an
+# valid image dir
+chdir('/') or die "could not chdir to /:$!\n";
+die "Internal Error: ($realimageloc) is not a directory!\n"
+ unless -d $realimageloc;
+
+if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
+ if (open(CONF, "$CONF_LOC")) {
+ while (<CONF>) {
+ chomp;
+ s/\#.*$//g;
+ next if /^\s*$/;
+
+ $do_symlink = "" if /do_symlinks\s*=\s*(no|false|0)\s*$/i;
+ $no_symlink = "" if /no_symlinks\s*=\s*(no|false|0)\s*$/i;
+ $link_in_boot = "" if /link_in_boot\s*=\s*(no|false|0)\s*$/i;
+ $use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
+ $minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
+ $ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
+
+ $do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
+ $no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
+ $link_in_boot = "Yes" if /link_in_boot\s*=\s*(yes|true|1)\s*$/i;
+ $use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
+ $minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
+ $ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
+
+ $image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
+ $postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/i;
+ $mkimage = "$1" if /mkimage\s*=\s*(.+)$/i;
+ $ramdisk = "$1" if /ramdisk\s*=\s*(.+)$/i;
+ }
+ close CONF;
+ $have_conffile = "Yes";
+ }
+}
+
+
+if ($link_in_boot) {
+ $image_dest = $realimageloc;
+}
+
+# Tack on at least one trainling /
+$image_dest = "$image_dest/";
+$image_dest =~ s|^/*|/|o;
+$image_dest =~ s|/+$|/|o;
+
+if (! -d "$image_dest") {
+ die "Expected Image Destination dir ($image_dest) to be a valid directory!\n";
+}
+
+# sanity
+if ($do_symlink && $no_symlink) {
+ warn "Both do_symlinks and no_symlinks options enabled; disabling no_symlinks\n";
+ $no_symlink = 0;
+}
+
+# most of our work is done in $image_dest (nominally /)
+chdir("$image_dest") or die "could not chdir to $image_dest:$!\n";
+
+$ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;
+
+
+die "Internal Error: Could not find image (" . $realimageloc
+ . "$kimage-$version)\n" unless -e $realimageloc
+ . "$kimage-$version";
+
+
+######################################################################
+######################################################################
+########### Test whether a relative symlinkwould be OK #######
+######################################################################
+######################################################################
+sub test_relative {
+ my %params = @_;
+ my $cwd;
+
+ die "Internal Error: Missing Required paramater 'Old Dir' "
+ unless $params{'Old Dir'};
+ die "Internal Error: Missing Required paramater New Dir' "
+ unless $params{'New Dir'};
+
+
+ die "Internal Error: No such dir $params{'Old Dir'} "
+ unless -d $params{'Old Dir'};
+ die "Internal Error: No such dir $params{'New Dir'} "
+ unless -d $params{'New Dir'};
+
+ warn "Test relative: testing $params{'Old Dir'} -> $params{'New Dir'}"
+ if $DEBUG;
+ chomp($cwd = `pwd`);
+ chdir ($params{'New Dir'}) or die "Could not chdir to $params{'New Dir'}:$!";
+ my $ok = 0;
+ $params{'Old Dir'} =~ s|^/*||o;
+ if (-d $params{'Old Dir'} ) {
+ if (defined $params{'Test File'}) {
+ if (-e $params{'Old Dir'} . $params{'Test File'}) {
+ $ok = 1;