projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[grml-debootstrap.git]
/
grml-debootstrap
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
3b40372
..
f2846c3
100644
(file)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-4,7
+4,7
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Fre Nov 03 1
1:24:15
CET 2006 [mika]
+# Latest change: Fre Nov 03 1
6:07:18
CET 2006 [mika]
################################################################################
# http://www.debian.org/releases/stable/i386/apcs04.html.en
################################################################################
# http://www.debian.org/releases/stable/i386/apcs04.html.en
@@
-15,8
+15,6
@@
set -e # exit on any error
check4progs debootstrap || exit 1
check4progs debootstrap || exit 1
-set -u # make sure we don't have empty variables
-
if [ -r /etc/debootstrap/config ] ; then
. /etc/debootstrap/config
else
if [ -r /etc/debootstrap/config ] ; then
. /etc/debootstrap/config
else
@@
-29,10
+27,17
@@
if [ -z "$TARGET" ] ; then
exit 1
fi
exit 1
fi
-# make an ext3 filesystem on /dev/sda1
-einfo "Running $MKFS on $TARGET"
-$MKFS $TARGET
-eend $?
+if [ -n "$MKFS" ] ; then
+ einfo "Running $MKFS on $TARGET"
+ $MKFS $TARGET
+ eend $?
+fi
+
+if [ -n "$TUNE2FS" ] ; then
+ einfo "Disabling automatic filesystem check on $TARGET via tune2fs"
+ $TUNE2FS $TARGET
+ eend $?
+fi
# now mount the new partition
if grep -q $TARGET /proc/mounts ; then
# now mount the new partition
if grep -q $TARGET /proc/mounts ; then
@@
-63,7
+68,7
@@
einfo "Preparing chroot system"
[ -d /etc/debootstrap/share ] && cp -a /etc/debootstrap/share/* $MNTPOINT/share/
[ -d /etc/debootstrap/usr ] && cp -a /etc/debootstrap/usr/* $MNTPOINT/usr/
[ -d /etc/debootstrap/var ] && cp -a /etc/debootstrap/var/* $MNTPOINT/var/
[ -d /etc/debootstrap/share ] && cp -a /etc/debootstrap/share/* $MNTPOINT/share/
[ -d /etc/debootstrap/usr ] && cp -a /etc/debootstrap/usr/* $MNTPOINT/usr/
[ -d /etc/debootstrap/var ] && cp -a /etc/debootstrap/var/* $MNTPOINT/var/
-eend
$?
+eend
0
einfo "Executing chroot-script now"
chroot $MNTPOINT /bin/chroot-script
einfo "Executing chroot-script now"
chroot $MNTPOINT /bin/chroot-script
@@
-73,6
+78,13
@@
einfo "Unmount $MNTPOINT"
umount $MNTPOINT
eend $?
umount $MNTPOINT
eend $?
+if [ "$FSCK" = 'yes' ] ; then
+ [ -n "$FSCKTOOL" ] || FSCKTOOL="fsck.${MKFS#mkfs.}"
+ einfo "Checking filesystem on $TARGET using $FSCKTOOL"
+ $FSCKTOOL $TARGET
+ eend $?
+fi
+
einfo "Finished execution of $0 - enjoy your Debian system." ; eend 0
## END OF FILE #################################################################
einfo "Finished execution of $0 - enjoy your Debian system." ; eend 0
## END OF FILE #################################################################