Bug#186443: base-installer shouldn't require /target/etc/fstab
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
retitle 186443 base-installer should not die if /target/etc/fstab is missing
reassign 186443 base-installer
thanks
Hello,
As I mentioned in my recent mail to debian-boot, I think that
base-installer _requiring_ /target/etc/fstab to exist is unnecessary and
wrong. The file is not needed to run debootstrap, and is in fact moved
out of the way by the postinst prior to running deboostrap, assuming it
exists. Additionally, the file is normally created in the prebaseconfig
step, by the script /usr/lib/prebaseconfig.d/40fstab, which is generally
run _after_ base-installer.
To fix this, the attached patch makes operations on the file conditional
on its existance. This way, if it's there -- it is dealt with;
otherwise, no harm is done.
Thanks,
Joe Nahmias, DD wannabe
- --- base-installer-0.020/debian/postinst.orig 2003-05-07 00:16:34.000000000 -0400
+++ base-installer-0.020/debian/postinst 2003-05-07 00:17:26.000000000 -0400
@@ -70,7 +70,7 @@
test -d $ETCDIR || mkdir -p $ETCDIR
test -d $LOGDIR || mkdir -p $LOGDIR
- -cp /target/etc/fstab /target/etc/fstab.orig
+[ -f /target/etc/fstab ] && cp /target/etc/fstab /target/etc/fstab.orig
echo "# UNCONFIGURED FSTAB FOR BASE SYSTEM" >> /target/etc/fstab
debootstrap \
@@ -82,7 +82,7 @@
3>&1 > $LOGDIR/debootstrap.log \
2> $LOGDIR/debootstrap.err.log </dev/null
- -mv /target/etc/fstab.orig /target/etc/fstab
+[ -f /target/etc/fstab.orig ] && mv /target/etc/fstab.orig /target/etc/fstab
# Why is this here? Why are the files moved into /target/? [pere 2003-02-07]
APTLISTDIR=/target/var/lib/apt/lists
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+uIw6Kl23+OYWEqURAh85AJ0YYptEkSMtuMcDXBEOz4aAqKDzCwCg6KhY
R9rk5ShE46E4XAp/yReyV9I=
=ZUd7
-----END PGP SIGNATURE-----
Reply to: