/usr/share/dell/casper/scripts/99dell_bootstrap is in dell-recovery 1.48.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | #!/bin/sh
#
# <99dell_bootstrap>
#
# Casper initramfs plugin.
# - prepare on-media pool
# - loads the ubiquity dell bootstrap plugin into place
# - ensures that it will run
#
# Copyright 2008-2011 Dell Inc.
# Mario Limonciello <Mario_Limonciello@Dell.com>
# Hatim Amro <Hatim_Amro@Dell.com>
# Michael E Brown <Michael_E_Brown@Dell.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# vim:ts=8:sw=8:et:tw=0
PREREQ=""
DESCRIPTION="Running DELL bootstrap..."
prereqs ()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
. /scripts/casper-functions
load_confmodule
log_begin_msg "$DESCRIPTION"
export DEBIAN_HAS_FRONTEND=
export DEBCONF_REDIR=
export DEBIAN_FRONTEND=noninteractive
if [ -d /root/isodevice ]; then
if [ -f /root/isodevice/.disk/info.recovery -a ! -f /root/isodevice/.disk/info ]; then
mount -o remount,rw /root/isodevice
cp /root/isodevice/.disk/info.recovery /root/isodevice/.disk/info
mount -o remount,ro /root/isodevice
fi
elif [ -f /root/cdrom/.disk/info.recovery -a ! -f /root/cdrom/.disk/info ]; then
mount -o remount,rw /root/cdrom
cp /root/cdrom/.disk/info.recovery /root/cdrom/.disk/info
mount -o remount,ro /root/cdrom
fi
#Force ubiquity to run in automatic regardless if there are ubiquity options in /proc/cmdline (except single user mode)
if ! grep -q "single" /proc/cmdline 2>&1 >/dev/null; then
sed -i "s/ubiquity=\$/ubiquity=1/; s/\$automatic\ \$choose/--automatic/" /root/etc/init/ubiquity.conf
fi
#if they use a ubiquity icon it needs to run in automatic
if [ -f /root/etc/init.d/casper ]; then
sed -i "s/prompt=1$/prompt=/;" /root/etc/init.d/casper
fi
sed -i "s/Exec=ubiquity/Exec=ubiquity --automatic/" /root/usr/share/applications/ubiquity-gtkui.desktop 2>/dev/null || true
#Build custom pool (static and dynamic)
if [ ! -x /root/usr/share/dell/scripts/pool.sh ]; then
mkdir -p /root/usr/share/dell/scripts/
cp /scripts/pool.sh /root/usr/share/dell/scripts/
fi
chroot /root /usr/share/dell/scripts/pool.sh
#install if not installed, otherwise this will upgrade
chroot /root apt-get install dell-recovery -y --no-install-recommends
#only if we are in factory or bto-a
if chroot /root apt-cache show fist 2>/dev/null 1>/dev/null; then
chroot /root apt-get install fist -y
fi
###Set up all preseeds###
# First test for and load override / configurations preseeds
# - needs to be loaded first so that we know if we are dual boot
for seed in dell-recovery gfx wlan; do
if [ -e /root/cdrom/preseed/$seed.seed ]; then
casper-set-selections /root/cdrom/preseed/$seed.seed
fi
done
# Now load all the defaults included in all installs
casper-set-selections "/root/usr/share/dell/casper/seeds/ubuntu.seed"
# If we have a dual boot option, load the dual boot preseed
if db_get dell-recovery/dual_boot && [ "$RET" = true ]; then
casper-set-selections "/root/usr/share/dell/casper/seeds/dual.seed"
fi
# Lastly, reload the override / configurations preseeds so that it is allowed to override stuff from ubuntu.seed and dual.seed
for seed in dell-recovery gfx wlan; do
if [ -e /root/cdrom/preseed/$seed.seed ]; then
casper-set-selections /root/cdrom/preseed/$seed.seed
fi
done
# if no efibootmgr in livefs, force it. needed for stage1
if [ -d /sys/firmware/efi ] && [ ! -x /root/bin/efibootmgr ]; then
chroot /root apt-get install efibootmgr -y
fi
# In case we're running a kernel not in the squashfs already
# we need to load modules into squashfs somehow
KERNELS=$(find /root/cdrom/kernel -maxdepth 1 -type d 2>/dev/null | sed "s,/root,,; /\/cdrom\/kernel\/$/d")
if [ -n "$KERNELS" ]; then
for KERNEL in $KERNELS; do
ln -s $KERNEL /root/lib/modules
done
fi
# Clear out debconf database backup files to save memory.
rm -f /root/var/cache/debconf/*.dat-old
#Emergency installer fixes
if [ -e /root/cdrom/scripts/emergency.sh ]; then
. /root/cdrom/scripts/emergency.sh
elif [ -e /root/isodevice/scripts/emergency.sh ]; then
. /root/isodevice/scripts/emergency.sh
fi
if [ -d /root/cdrom/scripts/emergency-scripts ]; then
for script in /root/cdrom/scripts/emergency-scripts/[0-9]*; do
. $script
done
elif [ -d /root/isodevice/scripts/emergency-scripts ]; then
for script in /root/isodevice/scripts/emergency-scripts/[0-9]*; do
. $script
done
fi
log_end_msg
exit 0
|