From 46e327ee238f7a1b11ec7c6895a0b4b87be9fbbe Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 16 Sep 2007 23:14:21 +0200 Subject: [PATCH] Support for /etc/grml/fai/files/; improve documentation of scripts and improve file-rc usage Add support for /etc/grml/fai/files/: files placed inside this directory are used inside /etc/grml/fai/config/scripts/GRML/ for customization process. Extend and update documentation of all the GRML/-scripts. Simplified the file-rc process (thanks, formorer). --- etc/grml/fai/config/hooks/instsoft.GRML | 34 +++++++--------- etc/grml/fai/config/scripts/GRML/05-hostname | 12 +++++- .../fai/config/scripts/GRML/10-build-initramfs | 13 ++++++ etc/grml/fai/config/scripts/GRML/15-initsetup | 11 ++++++ etc/grml/fai/config/scripts/GRML/20-sudo | 46 +++++++--------------- etc/grml/fai/config/scripts/GRML/21-usersetup | 11 ++++++ etc/grml/fai/config/scripts/GRML/25-locales | 11 ++++++ etc/grml/fai/config/scripts/GRML/30-fstab | 40 +++++++------------ etc/grml/fai/config/scripts/GRML/31-motd | 11 ++++++ etc/grml/fai/config/scripts/GRML/33-aptsetup | 30 ++++++-------- etc/grml/fai/config/scripts/GRML/34-hosts | 26 ++++++------ etc/grml/fai/config/scripts/GRML/35-network | 20 ++++++---- .../fai/config/scripts/GRML/90-update-alternatives | 12 +++++- etc/grml/fai/config/scripts/GRML/98-clean-chroot | 13 ++++++ .../fai/config/scripts/GRML/99-finish-grml-build | 12 ++++++ etc/grml/fai/files/etc/apt/preferences | 15 +++++++ etc/grml/fai/files/etc/fstab | 22 +++++++++++ etc/grml/fai/files/etc/hosts | 11 ++++++ etc/grml/fai/files/etc/network/interfaces | 4 ++ etc/grml/fai/files/etc/sudoers | 28 +++++++++++++ 20 files changed, 267 insertions(+), 115 deletions(-) create mode 100644 etc/grml/fai/files/etc/apt/preferences create mode 100644 etc/grml/fai/files/etc/fstab create mode 100644 etc/grml/fai/files/etc/hosts create mode 100644 etc/grml/fai/files/etc/network/interfaces create mode 100644 etc/grml/fai/files/etc/sudoers diff --git a/etc/grml/fai/config/hooks/instsoft.GRML b/etc/grml/fai/config/hooks/instsoft.GRML index 6f7cf08..e4449d8 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRML +++ b/etc/grml/fai/config/hooks/instsoft.GRML @@ -1,13 +1,17 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/hooks/instsoft.GRML +# Purpose: grml specific Debian installation in the chroot +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 22:53:02 CEST 2007 [mika] +################################################################################ + set -u set -e -# make sure we have file-rc available before -# package_config/GRML is being executed: - -# TODO: test whether adding file-rc to FAI_DEBOOTSTRAP_OPTS= would do the trick too - -# work around http://trac.lighttpd.net/trac/ticket/657: +# work around http://trac.lighttpd.net/trac/ticket/657 +# should be removed later on: echo "Acquire::http::Pipeline-Depth "0";" >> $target/etc/apt/apt.conf # install grml keys: @@ -15,24 +19,16 @@ gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key $ROOTCMD apt-key add /etc/apt/grml.key -# finally install file-rc: +# make sure we have file-rc available before +# package_config/GRML is being executed: $ROOTCMD apt-get update -$ROOTCMD apt-get --download-only --assume-yes install file-rc -$ROOTCMD /bin/sh -c "dpkg -i --force-all /var/cache/apt/archives/file-rc*.deb" -$ROOTCMD apt-get -f install file-rc +$ROOTCMD aptitude -f -y install file-rc -# we don't need the invoke-rc.d and update-rc.d diversion -# because otherwise use of file-rc with aptitude fails: +# we don't need the invoke-rc.d.d diversion (we have grml-policyrcd :)): if [ -L "$target"/usr/sbin/invoke-rc.d ] ; then rm -f "$target"/usr/sbin/invoke-rc.d $ROOTCMD dpkg-divert --package fai --rename --remove /usr/sbin/invoke-rc.d fi -if [ -L "$target"/usr/sbin/update-rc.d ] ; then - dpkg --purge sysv-rc - $ROOTCMD apt-get --assume-yes --reinstall install file-rc -fi - -# debug: -# $ROOTCMD /bin/bash +## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/05-hostname b/etc/grml/fai/config/scripts/GRML/05-hostname index cd83aa5..f38d2fd 100755 --- a/etc/grml/fai/config/scripts/GRML/05-hostname +++ b/etc/grml/fai/config/scripts/GRML/05-hostname @@ -1,9 +1,19 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/05-hostname +# Purpose: set hostname of live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 22:55:31 CEST 2007 [mika] +################################################################################ + set -u set -e HOSTNAME='' [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf [ -n "$HOSTNAME" ] || HOSTNAME=grml - echo "$HOSTNAME" > $target/etc/hostname + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/10-build-initramfs b/etc/grml/fai/config/scripts/GRML/10-build-initramfs index b35a0cb..2894ff4 100755 --- a/etc/grml/fai/config/scripts/GRML/10-build-initramfs +++ b/etc/grml/fai/config/scripts/GRML/10-build-initramfs @@ -1,9 +1,22 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/10-build-initramfs +# Purpose: configure live-initramfs and build initramfs for booting +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 22:56:40 CEST 2007 [mika] +################################################################################ + set -u set -e cp /etc/grml/fai/live-initramfs/live.conf $target/etc/live.conf cp /etc/grml/fai/live-initramfs/grml-script.init-top "$target/usr/share/initramfs-tools/scripts/init-top/grml" + FILE=$(ls -1 $target/boot/vmlinuz-* | sort -r | head -1) KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}") + $ROOTCMD update-initramfs -c -t -k $KERNELVERSION + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/15-initsetup b/etc/grml/fai/config/scripts/GRML/15-initsetup index 1b23d5e..2d18f64 100755 --- a/etc/grml/fai/config/scripts/GRML/15-initsetup +++ b/etc/grml/fai/config/scripts/GRML/15-initsetup @@ -1,4 +1,12 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/15-initsetup +# Purpose: configure init system for the live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 22:57:36 CEST 2007 [mika] +################################################################################ + set -u set -e @@ -7,3 +15,6 @@ if grep -q 'small' $target/etc/grml_version ; then else cp $target/etc/runlevel.conf.livecd $target/etc/runlevel.conf fi + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/20-sudo b/etc/grml/fai/config/scripts/GRML/20-sudo index 502f2ae..8595bf1 100755 --- a/etc/grml/fai/config/scripts/GRML/20-sudo +++ b/etc/grml/fai/config/scripts/GRML/20-sudo @@ -1,4 +1,12 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/20-sudo +# Purpose: configure sudo setup of the live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:12:25 CEST 2007 [mika] +################################################################################ + set -u set -e @@ -6,36 +14,10 @@ USERNAME='' [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf [ -n "$USERNAME" ] || USERNAME=grml -# FIXME: use /etc/grml/fai/... as base -cat > $target/etc/sudoers << EOF -# sudoers file. -# This file MUST be edited with the "visudo" command as root. -# See the man page for details on how to write a sudoers file. - -# Host alias specification - -# User alias specification - -# Cmnd alias specification - -# User privilege specification -root ALL=(ALL) ALL - -# WARNING: This allows the unprivileged $USERNAME user to start commands as root -# WARNING: This is totally insecure and (almost) makes $USERNAME a second root account. -# WARNING: Never allow external access to the $USERNAME user!!! -$USERNAME ALL=NOPASSWD: ALL - -# allow editing of files with editor: -# $USERNAME ALL=NOPASSWD: sudoedit - -# usage examples: -# $USERNAME ALL=NOPASSWD: /sbin/hdparm -# $USERNAME ALL=NOPASSWD: /usr/sbin/hwinfo -# Cmnd_Alias DEBIAN = /usr/bin/apt-get, /usr/bin/dpkg, /usr/bin/auto-apt, /usr/bin/apt-file -# $USERNAME ALL=NOPASSWD: DEBIAN -# chroot ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - chroot -# chroot ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - chroot +if [ -r /etc/grml/fai/files/etc/sudoers ] ; then + cp /etc/grml/fai/files/etc/sudoers $target/etc/sudoers + chmod 440 $target/etc/sudoers +fi -secvpn ALL=NOPASSWD: /usr/sbin/secvpn, /usr/sbin/pppd -EOF +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/21-usersetup b/etc/grml/fai/config/scripts/GRML/21-usersetup index 87d5ad2..28a40d3 100755 --- a/etc/grml/fai/config/scripts/GRML/21-usersetup +++ b/etc/grml/fai/config/scripts/GRML/21-usersetup @@ -1,4 +1,12 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/21-usersetup +# Purpose: adjust user setup of the live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 22:58:45 CEST 2007 [mika] +################################################################################ + set -u set -e @@ -14,3 +22,6 @@ sed -i 's/^$USERNAME::/$USERNAME:*:/' $target/etc/shadow $ROOTCMD chsh -s /bin/zsh root $ROOTCMD chsh -s /bin/zsh $USERNAME + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/25-locales b/etc/grml/fai/config/scripts/GRML/25-locales index ba51c6d..477a182 100755 --- a/etc/grml/fai/config/scripts/GRML/25-locales +++ b/etc/grml/fai/config/scripts/GRML/25-locales @@ -1,6 +1,17 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/25-locales +# Purpose: locales (language) configuration of the live system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 22:59:23 CEST 2007 [mika] +################################################################################ + set -u set -e cp $target/etc/locale.gen.minimal $target/etc/locale.gen $ROOTCMD locale-gen + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/30-fstab b/etc/grml/fai/config/scripts/GRML/30-fstab index 0ee52d1..08cd375 100755 --- a/etc/grml/fai/config/scripts/GRML/30-fstab +++ b/etc/grml/fai/config/scripts/GRML/30-fstab @@ -1,4 +1,12 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/30-fstab +# Purpose: create initial /etc/fstab for use on live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:09:08 CEST 2007 [mika] +################################################################################ + set -u set -e @@ -6,28 +14,10 @@ USERNAME='' [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf [ -n "$USERNAME" ] || USERNAME=grml -# FIXME: use /etc/grml/fai/... as base -cat > "$target"/etc/fstab << EOF -# /etc/fstab - static file system information -# -proc /proc proc rw,nosuid,nodev,noexec 0 0 -none /proc/bus/usb usbfs defaults,noauto 0 0 -sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0 -devpts /dev/pts devpts noauto,mode=0622 0 0 -/dev/fd0 /mnt/floppy auto users,noauto,exec 0 0 -/dev/external /mnt/external auto users,noauto,exec,rw,uid=$USERNAME,gid=$USERNAME 0 0 -/dev/external1 /mnt/external1 auto users,noauto,exec,rw,uid=$USERNAME,gid=$USERNAME 0 0 -/dev/cdrom /mnt/cdrom auto users,noauto,exec,ro 0 0 -/dev/dvd /mnt/dvd auto users,noauto,exec,ro 0 0 -# some other examples: -# /dev/hda1 /Grml ext3 dev,suid,user,noauto 0 2 -# //1.2.3.4/pub /smb/pub smbfs defaults,user,noauto,uid=grml,gid=grml 0 0 -# linux:/pub /beer nfs defaults 0 0 -# tmpfs /tmp tmpfs size=300M 0 0 -# none /proc/bus/usb usbfs defaults,nodev,noexec,nosuid,noauto,devgid=1001,devmode=664 0 0 -# 192.168.1.101:/backups /mnt/nfs nfs defaults,users,wsize=8192,rsize=8192 0 0 -# -# Warning! Please do *not* change any lines below because they are auto-generated by rebuildfstab! -# If you want to disable rebuildfstab set CONFIG_FSTAB='no' in /etc/grml/autoconfig! -# See 'man grml-rebuildfstab' for more details about the following entries. -EOF +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 + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/31-motd b/etc/grml/fai/config/scripts/GRML/31-motd index 2f1e775..2d20b0a 100755 --- a/etc/grml/fai/config/scripts/GRML/31-motd +++ b/etc/grml/fai/config/scripts/GRML/31-motd @@ -1,5 +1,16 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/31-motd +# Purpose: make sure the motd setup is correct +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:00:35 CEST 2007 [mika] +################################################################################ + set -u set -e $ROOTCMD mv /etc/motd.dpkg-new /var/run/motd + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/33-aptsetup b/etc/grml/fai/config/scripts/GRML/33-aptsetup index 5a754d2..740b81e 100755 --- a/etc/grml/fai/config/scripts/GRML/33-aptsetup +++ b/etc/grml/fai/config/scripts/GRML/33-aptsetup @@ -1,4 +1,12 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/33-aptsetup +# Purpose: configure Debian package management of live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:10:06 CEST 2007 [mika] +################################################################################ + set -u set -e @@ -6,21 +14,9 @@ rm -f $target/etc/apt/sources.list $ROOTCMD ln -s /etc/apt/sources.list.grml /etc/apt/sources.list -# FIXME: use /etc/grml/fai/... as base -cat > $target/etc/apt/preferences << EOF -// main grml-repository: -Package: * -Pin: origin deb.grml.org -Pin-Priority: 996 - -// fallback grml-repository: -Package: * -Pin: origin grml.org -Pin-Priority: 995 - -// debian unstable pool (default): -Package: * -Pin: release a=unstable,o=Debian -Pin-Priority: 991 +if [ -r /etc/grml/fai/files/etc/apt/preferences ] ; then + cp /etc/grml/fai/files/etc/apt/preferences $target/etc/apt/preferences +fi -EOF +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/34-hosts b/etc/grml/fai/config/scripts/GRML/34-hosts index d3ae45b..4e9c513 100755 --- a/etc/grml/fai/config/scripts/GRML/34-hosts +++ b/etc/grml/fai/config/scripts/GRML/34-hosts @@ -1,4 +1,12 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/34-hosts +# Purpose: configure /etc/hosts of live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:10:46 CEST 2007 [mika] +################################################################################ + set -u set -e @@ -6,17 +14,9 @@ HOSTNAME='' [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf [ -n "$HOSTNAME" ] || HOSTNAME=grml -# FIXME: use /etc/grml/fai/... as base -cat > $target/etc/hosts << EOF -127.0.0.1 $HOSTNAME localhost - -# The following lines are desirable for IPv6 capable hosts -# (added automatically by netbase upgrade) +if [ -r /etc/grml/fai/files/etc/hosts ] ; then + cp /etc/grml/fai/files/etc/hosts $target/etc/hosts +fi -::1 ip6-localhost ip6-loopback $HOSTNAME -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -ff02::3 ip6-allhosts -EOF +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/35-network b/etc/grml/fai/config/scripts/GRML/35-network index 59cc2e4..a16460f 100755 --- a/etc/grml/fai/config/scripts/GRML/35-network +++ b/etc/grml/fai/config/scripts/GRML/35-network @@ -1,12 +1,18 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/35-network +# Purpose: set up /etc/network/interfaces of live-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:02:18 CEST 2007 [mika] +################################################################################ + set -u set -e -# FIXME: use /etc/grml/fai/... as base -cat >> $target/etc/network/interfaces << EOF -# The loopback interface -# automatically added when upgrading -auto lo -iface lo inet loopback -EOF +if [ -r /etc/grml/fai/files/etc/network/interfaces ] ; then + cp /etc/grml/fai/files/etc/network/interfaces $target/etc/network/interfaces +fi +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/90-update-alternatives b/etc/grml/fai/config/scripts/GRML/90-update-alternatives index 40b64b5..ba17d88 100755 --- a/etc/grml/fai/config/scripts/GRML/90-update-alternatives +++ b/etc/grml/fai/config/scripts/GRML/90-update-alternatives @@ -1,8 +1,18 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/90-update-alternatives +# Purpose: set up /etc/alternatives/* according to grml preferences +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:02:53 CEST 2007 [mika] +################################################################################ + set -u set -e -# FIXME: use /etc/grml/fai/... as base if [ -r $target/usr/bin/vim.basic ] ; then $ROOTCMD update-alternatives --set editor /usr/bin/vim.basic fi + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/98-clean-chroot b/etc/grml/fai/config/scripts/GRML/98-clean-chroot index 4413e7e..22d0bdc 100755 --- a/etc/grml/fai/config/scripts/GRML/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRML/98-clean-chroot @@ -1,7 +1,20 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/98-clean-chroot +# Purpose: clean up chroot system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:03:50 CEST 2007 [mika] +################################################################################ + set -u set -e +# TODO: provide customization of what should be cleaned up + cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/ $ROOTCMD /root/grml_cleanup_chroot rm $target/root/grml_cleanup_chroot + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/config/scripts/GRML/99-finish-grml-build b/etc/grml/fai/config/scripts/GRML/99-finish-grml-build index 6f8a3f7..b421ce3 100755 --- a/etc/grml/fai/config/scripts/GRML/99-finish-grml-build +++ b/etc/grml/fai/config/scripts/GRML/99-finish-grml-build @@ -1,5 +1,17 @@ #!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRML/99-finish-grml-build +# Purpose: finalize grml chroot build +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +# Latest change: Sun Sep 16 23:04:36 CEST 2007 [mika] +################################################################################ + set -u set -e +# /etc/grml_cd makes the live system recognizable as a live system touch $target/etc/grml_cd + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 diff --git a/etc/grml/fai/files/etc/apt/preferences b/etc/grml/fai/files/etc/apt/preferences new file mode 100644 index 0000000..3df8f95 --- /dev/null +++ b/etc/grml/fai/files/etc/apt/preferences @@ -0,0 +1,15 @@ +// main grml-repository: +Package: * +Pin: origin deb.grml.org +Pin-Priority: 996 + +// fallback grml-repository: +Package: * +Pin: origin grml.org +Pin-Priority: 995 + +// debian unstable pool (default): +Package: * +Pin: release a=unstable,o=Debian +Pin-Priority: 991 + diff --git a/etc/grml/fai/files/etc/fstab b/etc/grml/fai/files/etc/fstab new file mode 100644 index 0000000..53567fa --- /dev/null +++ b/etc/grml/fai/files/etc/fstab @@ -0,0 +1,22 @@ +# /etc/fstab - static file system information +# +proc /proc proc rw,nosuid,nodev,noexec 0 0 +none /proc/bus/usb usbfs defaults,noauto 0 0 +sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0 +devpts /dev/pts devpts noauto,mode=0622 0 0 +/dev/fd0 /mnt/floppy auto users,noauto,exec 0 0 +/dev/external /mnt/external auto users,noauto,exec,rw,uid=USERNAME,gid=USERNAME 0 0 +/dev/external1 /mnt/external1 auto users,noauto,exec,rw,uid=USERNAME,gid=USERNAME 0 0 +/dev/cdrom /mnt/cdrom auto users,noauto,exec,ro 0 0 +/dev/dvd /mnt/dvd auto users,noauto,exec,ro 0 0 +# some other examples: +# /dev/hda1 /Grml ext3 dev,suid,user,noauto 0 2 +# //1.2.3.4/pub /smb/pub smbfs defaults,user,noauto,uid=grml,gid=grml 0 0 +# linux:/pub /beer nfs defaults 0 0 +# tmpfs /tmp tmpfs size=300M 0 0 +# none /proc/bus/usb usbfs defaults,nodev,noexec,nosuid,noauto,devgid=1001,devmode=664 0 0 +# 192.168.1.101:/backups /mnt/nfs nfs defaults,users,wsize=8192,rsize=8192 0 0 +# +# Warning! Please do *not* change any lines below because they are auto-generated by rebuildfstab! +# If you want to disable rebuildfstab set CONFIG_FSTAB='no' in /etc/grml/autoconfig! +# See 'man grml-rebuildfstab' for more details about the following entries. diff --git a/etc/grml/fai/files/etc/hosts b/etc/grml/fai/files/etc/hosts new file mode 100644 index 0000000..03ddf41 --- /dev/null +++ b/etc/grml/fai/files/etc/hosts @@ -0,0 +1,11 @@ +127.0.0.1 $HOSTNAME localhost + +# The following lines are desirable for IPv6 capable hosts +# (added automatically by netbase upgrade) + +::1 ip6-localhost ip6-loopback $HOSTNAME +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +ff02::3 ip6-allhosts diff --git a/etc/grml/fai/files/etc/network/interfaces b/etc/grml/fai/files/etc/network/interfaces new file mode 100644 index 0000000..35948f9 --- /dev/null +++ b/etc/grml/fai/files/etc/network/interfaces @@ -0,0 +1,4 @@ +# The loopback interface +# automatically added when upgrading +auto lo +iface lo inet loopback diff --git a/etc/grml/fai/files/etc/sudoers b/etc/grml/fai/files/etc/sudoers new file mode 100644 index 0000000..fa78cc0 --- /dev/null +++ b/etc/grml/fai/files/etc/sudoers @@ -0,0 +1,28 @@ +# sudoers file. +# This file MUST be edited with the "visudo" command as root. +# See the man page for details on how to write a sudoers file. + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL) ALL + +# WARNING: This allows the unprivileged $USERNAME user to start commands as root +# WARNING: This is totally insecure and (almost) makes $USERNAME a second root account. +# WARNING: Never allow external access to the $USERNAME user!!! +$USERNAME ALL=NOPASSWD: ALL + +# allow editing of files with editor: +# $USERNAME ALL=NOPASSWD: sudoedit + +# usage examples: +# $USERNAME ALL=NOPASSWD: /sbin/hdparm +# $USERNAME ALL=NOPASSWD: /usr/sbin/hwinfo +# Cmnd_Alias DEBIAN = /usr/bin/apt-get, /usr/bin/dpkg, /usr/bin/auto-apt, /usr/bin/apt-file +# $USERNAME ALL=NOPASSWD: DEBIAN +# chroot ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - chroot +# chroot ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - chroot -- 2.1.4