2007-04-10 23:21:31 +00:00
|
|
|
# This file provides some common code that is intented to be called
|
|
|
|
# by the various boot-<arch> scripts.
|
|
|
|
|
|
|
|
|
2008-10-14 08:22:00 +00:00
|
|
|
# Expand %ARCH% variable in envvars for location of D-I images
|
2008-11-14 19:14:35 -01:00
|
|
|
DI_WWW_HOME="$(echo "$DI_WWW_HOME" | sed -e "s|%ARCH%|$ARCH|g")"
|
|
|
|
DI_DIR="$(echo "$DI_DIR" | sed -e "s|%ARCH%|$ARCH|g")"
|
2008-10-14 08:22:00 +00:00
|
|
|
|
2008-12-05 13:12:26 -01:00
|
|
|
# Only i386 and amd64 support desktop selection with the 'light' and 'all'
|
|
|
|
# desktops; make sure other arches get a working config
|
|
|
|
if [ "$ARCH" != i386 ] && [ "$ARCH" != amd64 ]; then
|
|
|
|
case $DESKTOP in
|
2008-12-05 13:12:32 -01:00
|
|
|
all|gnome)
|
2008-12-05 13:12:26 -01:00
|
|
|
DESKTOP=
|
|
|
|
KERNEL_PARAMS="$(echo "$KERNEL_PARAMS" | \
|
2008-12-05 13:12:32 -01:00
|
|
|
sed -r "s/desktop=[^ ]* ?//")"
|
2008-12-05 13:12:26 -01:00
|
|
|
;;
|
|
|
|
light)
|
|
|
|
DESKTOP=xfce
|
|
|
|
KERNEL_PARAMS="$(echo "$KERNEL_PARAMS" | \
|
|
|
|
sed -r "s/(desktop=)light/\1xfce/")"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2008-10-14 08:22:00 +00:00
|
|
|
|
2007-04-10 23:21:31 +00:00
|
|
|
# install_languages decompacts the language packs, you should give the path
|
|
|
|
# to the CD temporary tree.
|
|
|
|
# This function should be called for all bootable images.
|
|
|
|
install_languages() {
|
|
|
|
# Param $1 is the CD directory
|
|
|
|
if [ -f "$MIRROR/dists/$DI_CODENAME/main/disks-$ARCH/current/xlp.tgz" ]
|
|
|
|
then
|
|
|
|
mkdir $1/.xlp
|
|
|
|
(cd $1/.xlp; \
|
|
|
|
tar zxf $MIRROR/dists/$DI_CODENAME/main/disks-$ARCH/current/xlp.tgz )
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Add an option to the mkisofs options for this CD _only_ if it's not
|
|
|
|
# already set. $1 is the opts file location, "$2" is the new
|
|
|
|
# option. Call this with _logical groupings_ of options
|
|
|
|
add_mkisofs_opt() {
|
|
|
|
OPTS_FILE=$1
|
|
|
|
NEW_OPT="$2"
|
|
|
|
|
|
|
|
if ! ( grep -q -- "$NEW_OPT" $OPTS_FILE 2>/dev/null) ; then
|
|
|
|
echo -n "$NEW_OPT " >> $OPTS_FILE
|
|
|
|
fi
|
|
|
|
}
|