Instead use the GRML_LIVE_SOURCES variable inside /etc/grml/grml-live.conf or
/etc/grml/grml-live.local which modifies /etc/grml/fai/apt/sources.list
on-the-fly via grml-live then. If you want to generally adjust apt configuration
-check out /etc/grml/fai/files/etc/apt instead.
+use FAI's fcopy command with /etc/grml/fai/config/files instead.
/etc/grml/fai/config/
Scripts for customising the ISO within the build process.
- /etc/grml/fai/files/
-
-This directory provides files used inside the scripts of
-/etc/grml/fai/config/scripts/*. For a full documentation what happens with the
-files please refer to the source of the scripts.
-
/etc/grml/fai/live-initramfs/
This directory provides the files used for building the initramfs/initrd via
# NOTE: This directory is *NOT* meant for manual customisation! Files in this
# directory are written by grml-live only and any changes might be overriden.
# You might consider using GRML_LIVE_SOURCES in /etc/grml/grml-live.conf*
-# and /etc/grml/fai/files/etc/apt instead!
+# or FAI's fcopy command with /etc/grml/fai/config/files instead!
# NOTE: This file is *NOT* meant for manual customisation! This file is
# modified by grml-live and any changes might be overriden.
# You might consider using GRML_LIVE_SOURCES in /etc/grml/grml-live.conf*
-# and using /etc/grml/fai/files/etc/apt instead!'
+# or FAI's fcopy command with /etc/grml/fai/config/files instead!
deb http://deb.grml.org/ grml-stable main
deb http://deb.grml.org/ grml-testing main
deb http://cdn.debian.net/debian lenny main contrib non-free
else # no softupdate but fresh installation
# install all apt related files
-if [ -r /etc/grml/fai/files/etc/apt ] ; then
- cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/
- # remove grml-live's sources.list file from chroot:
- if [ -r $target/etc/apt/important_note.txt ] ; then
- grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt
- fi
-fi
+fcopy -r /etc/apt
-# install all present (but at least the grml) gpg keys:
-if [ -r /etc/grml/fai/files/etc/apt/grml.key ] ; then
- for file in /etc/grml/fai/files/etc/apt/*.key ; do
- FILE="$(basename $file)"
- # installed via 'cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/' above already
- # cp $file $target/etc/apt/"$FILE"
- $ROOTCMD apt-key add /etc/apt/"$FILE"
- done
-else
- gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 || \
- gpg --keyserver blackhole.pca.dfn.de --recv-keys F61E2E7CECDEA787
- gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key
- $ROOTCMD apt-key add /etc/apt/grml.key
+# remove grml-live's sources.list file from chroot:
+if [ -r $target/etc/apt/important_note.txt ] ; then
+ grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt
fi
+# install grml gpg key:
+fcopy /etc/apt/grml.key
+$ROOTCMD apt-key add /etc/apt/grml.key
+# gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 || \
+# gpg --keyserver blackhole.pca.dfn.de --recv-keys F61E2E7CECDEA787
+# gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key
+# $ROOTCMD apt-key add /etc/apt/grml.key
+
# make sure the file exists
[ -e $target/etc/apt/apt.conf ] || touch $target/etc/apt/apt.conf
else # no softupdate but updating chroot based on /etc/grml/fai/config/basefiles/*
# install all apt related files
-if [ -r /etc/grml/fai/files/etc/apt ] ; then
- cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/
- # remove grml-live's sources.list file from chroot:
- if [ -r $target/etc/apt/important_note.txt ] ; then
- grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt
- fi
-fi
+fcopy -r /etc/apt
-# install all present (but at least the grml) gpg keys:
-if [ -r /etc/grml/fai/files/etc/apt/grml.key ] ; then
- for file in /etc/grml/fai/files/etc/apt/*.key ; do
- FILE="$(basename $file)"
- # installed via 'cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/' above already
- # cp $file $target/etc/apt/"$FILE"
- $ROOTCMD apt-key add /etc/apt/"$FILE"
- done
-else
- gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 || \
- gpg --keyserver blackhole.pca.dfn.de --recv-keys F61E2E7CECDEA787
- gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key
- $ROOTCMD apt-key add /etc/apt/grml.key
+# remove grml-live's notice file from chroot:
+if [ -r $target/etc/apt/important_note.txt ] ; then
+ grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt
fi
-fi
+# install grml gpg key:
+fcopy /etc/apt/grml.key
+$ROOTCMD apt-key add /etc/apt/grml.key
+
+fi # softupdate check
## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
set -e
-if ! [ -f "$target/etc/live.conf" ] ; then
- echo "Warning: $target/etc/live.conf does not exist yet,"
- echo " ... installing /etc/grml/fai/live-initramfs/live.conf"
- cp /etc/grml/fai/live-initramfs/live.conf "$target/etc/live.conf"
-fi
-
-if [ -f /etc/grml/fai/live-initramfs/grml-script.init-top ] ; then
- cp /etc/grml/fai/live-initramfs/grml-script.init-top "$target/usr/share/initramfs-tools/scripts/init-top/grml"
-else
- echo "Warning: /etc/grml/fai/live-initramfs/grml-script.init-top could not be read"
-fi
+fcopy /etc/live.conf
+fcopy /usr/share/initramfs-tools/scripts/init-top/grml
FILE=$(ls -1 $target/boot/vmlinuz-* 2>/dev/null| sort -r | head -1)
KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}")
-# make sure mdadm isn't executed in initrd:
-#if [ -f "$target"/etc/default/mdadm ] ; then
-# sed -i "s/START_DAEMON=.*/START_DAEMON=false/" "$target"/etc/default/mdadm
-# sed -i "s/INITRDSTART=.*/INITRDSTART=none/" "$target"/etc/default/mdadm
-#fi
-
if [ -z "$KERNELVERSION" ] ; then
echo "Error: No kernel found, can not create initramfs. Exiting.">&2
exit 1
[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$USERNAME" ] || USERNAME=grml
-if [ -r /etc/grml/fai/files/etc/sudoers ] ; then
- cp /etc/grml/fai/files/etc/sudoers $target/etc/sudoers
- sed -i "s/\$USERNAME/$USERNAME/" $target/etc/sudoers
- chmod 440 $target/etc/sudoers
-fi
+fcopy /etc/sudoers
+sed -i "s/\$USERNAME/$USERNAME/" $target/etc/sudoers
+chmod 440 $target/etc/sudoers
## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$USERNAME" ] || USERNAME=grml
-if [ -r /etc/grml/fai/files/etc/fstab ] ; then
- cp /etc/grml/fai/files/etc/fstab $target/etc/fstab
- sed -i "s/uid=USERNAME,gid=USERNAME/uid=$USERNAME,gid=$USERNAME/" $target/etc/fstab
-fi
+fcopy /etc/fstab
+sed -i "s/uid=USERNAME,gid=USERNAME/uid=$USERNAME,gid=$USERNAME/" $target/etc/fstab
## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$HOSTNAME" ] || HOSTNAME=grml
-if [ -r /etc/grml/fai/files/etc/hosts ] ; then
- cp /etc/grml/fai/files/etc/hosts $target/etc/hosts
-fi
+fcopy /etc/hosts
# replace $HOSTNAME with the real hostname:
sed -i "s/\$HOSTNAME/$HOSTNAME/" $target/etc/hosts
set -u
set -e
-if [ -r /etc/grml/fai/files/etc/network/interfaces ] ; then
- cp /etc/grml/fai/files/etc/network/interfaces $target/etc/network/interfaces
-fi
+fcopy /etc/network/interfaces
## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
# NOTE: This file is *NOT* meant for manual customisation! This file is
# modified by grml-live and any changes might be overriden.
# You might consider using GRML_LIVE_SOURCES in /etc/grml/grml-live.conf*
-# and using /etc/grml/fai/files/etc/apt instead!'
+# or FAI's fcopy command with /etc/grml/fai/config/files instead!
EOF
echo "$MIRROR_SOURCES" >> "$SOURCES_LIST_FILE"
if [ -n "$GRML_LIVE_SOURCES" ] ; then
# NOTE: This file is *NOT* meant for manual customisation! This file is
# modified by grml-live and any changes might be overriden.
# You might consider using GRML_LIVE_SOURCES in /etc/grml/grml-live.conf*
-# and using /etc/grml/fai/files/etc/apt instead!'
+# or FAI's fcopy command with /etc/grml/fai/config/files instead!
EOF
echo "$GRML_LIVE_SOURCES" >> "$SOURCES_LIST_FILE"
fi