From: Christian Hofstaedtler Date: Fri, 30 Oct 2009 16:09:41 +0000 (+0100) Subject: Ensure /etc/mtab is always present X-Git-Tag: v0.9.30~8 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=64e317befd4f1640f31e111c2fe4f453ae8aac2d Ensure /etc/mtab is always present Newer debootstrap versions no longer create /etc/mtab, so we need to provide our own. --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/02-mtab b/etc/grml/fai/config/scripts/GRMLBASE/02-mtab new file mode 100755 index 0000000..a7efced --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/02-mtab @@ -0,0 +1,27 @@ +#!/bin/sh +# Filename: /etc/grml/fai/config/scripts/GRMLBASE/02-mtab +# Purpose: create mtab if it does not yet exist +# 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. +################################################################################ + +set -u +set -e + +[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf +[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local + +# newer debootstrap does not create an mtab. +# create it and fill it with what is probably already mounted. +if [ ! -e $target/etc/mtab ] ; then + cat > $target/etc/mtab << EOF +proc /proc proc rw 0 0 +sysfs /sys sysfs rw 0 0 +/dev /dev tmpfs rw 0 0 +devpts /dev/pts devpts rw 0 0 +EOF +fi + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3