projects
/
grml-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1e9092e
)
Update resolv.conf handling to properly support /run (see issue984).
author
Michael Prokop
<mika@grml.org>
Sun, 29 May 2011 10:03:12 +0000
(12:03 +0200)
committer
Michael Prokop
<mika@grml.org>
Sat, 4 Jun 2011 10:59:29 +0000
(12:59 +0200)
etc/grml/fai/config/hooks/instsoft.GRMLBASE
patch
|
blob
|
history
etc/grml/fai/config/scripts/GRMLBASE/96-apt-listbugs
patch
|
blob
|
history
etc/grml/fai/grml/grml_cleanup_chroot
patch
|
blob
|
history
diff --git
a/etc/grml/fai/config/hooks/instsoft.GRMLBASE
b/etc/grml/fai/config/hooks/instsoft.GRMLBASE
index
cf8c3be
..
c787334
100755
(executable)
--- a/
etc/grml/fai/config/hooks/instsoft.GRMLBASE
+++ b/
etc/grml/fai/config/hooks/instsoft.GRMLBASE
@@
-21,7
+21,7
@@
if [ "$FAI_ACTION" = "softupdate" ] ; then
echo "Action $FAI_ACTION of FAI (hooks/instsoft.GRMLBASE) via grml-live running"
if [ -r /etc/resolv.conf ] ; then
echo "Action $FAI_ACTION of FAI (hooks/instsoft.GRMLBASE) via grml-live running"
if [ -r /etc/resolv.conf ] ; then
- if [ -d $target/etc/resolvconf/run ] ; then # resolvconf
+ if [ -d $target/etc/resolvconf/run ] ; then # resolvconf
without /run
# sanity check to avoid "input file is output file",
# see http://bts.grml.org/grml/issue984
if ! [ -L $target/etc/resolvconf/run/resolv.conf ] ; then
# sanity check to avoid "input file is output file",
# see http://bts.grml.org/grml/issue984
if ! [ -L $target/etc/resolvconf/run/resolv.conf ] ; then
@@
-31,6
+31,10
@@
if [ "$FAI_ACTION" = "softupdate" ] ; then
echo " Looks like something is wrong, please fix manually." >&2
exit 1
fi
echo " Looks like something is wrong, please fix manually." >&2
exit 1
fi
+ elif [ -L $target/etc/resolvconf/run ] ; then # resolvconf with /run
+ # /etc/resolvconf/run symlinks to /run/resolvconf
+ mkdir -p $target/run/resolvconf
+ cat /etc/resolv.conf >> $target/run/resolvconf/resolv.conf
else # no resolvconf installed in chroot
if ! [ -L $target/etc/resolv.conf ] ; then
cat /etc/resolv.conf >> $target/etc/resolv.conf
else # no resolvconf installed in chroot
if ! [ -L $target/etc/resolv.conf ] ; then
cat /etc/resolv.conf >> $target/etc/resolv.conf
@@
-153,4
+157,4
@@
if [ -L "$target"/usr/sbin/invoke-rc.d ] ; then
fi
## END OF FILE #################################################################
fi
## END OF FILE #################################################################
-# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=
3
+# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=
2
diff --git
a/etc/grml/fai/config/scripts/GRMLBASE/96-apt-listbugs
b/etc/grml/fai/config/scripts/GRMLBASE/96-apt-listbugs
index
bbe6117
..
65a1f53
100755
(executable)
--- a/
etc/grml/fai/config/scripts/GRMLBASE/96-apt-listbugs
+++ b/
etc/grml/fai/config/scripts/GRMLBASE/96-apt-listbugs
@@
-22,22
+22,26
@@
if ifclass RELEASE ; then
[ -n "$HOSTNAME" ] || HOSTNAME=grml
if [ -r /etc/resolv.conf ] ; then
[ -n "$HOSTNAME" ] || HOSTNAME=grml
if [ -r /etc/resolv.conf ] ; then
- if [ -d $target/etc/resolvconf/run ] ; then # resolvconf
+ if [ -d $target/etc/resolvconf/run ] ; then # resolvconf
without /run
# sanity check to avoid "input file is output file",
# see http://bts.grml.org/grml/issue984
if ! [ -L $target/etc/resolvconf/run/resolv.conf ] ; then
# sanity check to avoid "input file is output file",
# see http://bts.grml.org/grml/issue984
if ! [ -L $target/etc/resolvconf/run/resolv.conf ] ; then
-
cat /etc/resolv.conf >> $target/etc/resolvconf/run/resolv.conf
+ cat /etc/resolv.conf >> $target/etc/resolvconf/run/resolv.conf
else
else
-
echo "Error: /etc/resolvconf/run/resolv.conf in chroot should not be a symlink." >&2
-
echo " Looks like something is wrong, please fix manually." >&2
-
exit 1
+ echo "Error: /etc/resolvconf/run/resolv.conf in chroot should not be a symlink." >&2
+ echo " Looks like something is wrong, please fix manually." >&2
+ exit 1
fi
fi
+ elif [ -L $target/etc/resolvconf/run ] ; then # resolvconf with /run
+ # /etc/resolvconf/run symlinks to /run/resolvconf
+ mkdir -p $target/run/resolvconf
+ cat /etc/resolv.conf >> $target/run/resolvconf/resolv.conf
else # no resolvconf installed in chroot
if ! [ -L $target/etc/resolv.conf ] ; then
else # no resolvconf installed in chroot
if ! [ -L $target/etc/resolv.conf ] ; then
-
cat /etc/resolv.conf >> $target/etc/resolv.conf
+ cat /etc/resolv.conf >> $target/etc/resolv.conf
else
else
-
echo "Error: /etc/resolv.conf in chroot should not be a symlink (resolvconf not installed)." >&2
-
exit 1
+ echo "Error: /etc/resolv.conf in chroot should not be a symlink (resolvconf not installed)." >&2
+ exit 1
fi
fi
fi
fi
fi
fi
diff --git
a/etc/grml/fai/grml/grml_cleanup_chroot
b/etc/grml/fai/grml/grml_cleanup_chroot
index
2ad900b
..
074e60e
100755
(executable)
--- a/
etc/grml/fai/grml/grml_cleanup_chroot
+++ b/
etc/grml/fai/grml/grml_cleanup_chroot
@@
-306,10
+306,17
@@
fi
# installation of resolvconf in chroot *with* /proc
# is different from an installation without /proc,
# installation of resolvconf in chroot *with* /proc
# is different from an installation without /proc,
-# so make sure it is OK in any case
; don't use /dev/shm
+# so make sure it is OK in any case
if [ -d /etc/resolvconf ] ; then
if [ -d /etc/resolvconf ] ; then
- rm -rf /etc/resolvconf/run
- mkdir /etc/resolvconf/run
+ if [ -L /etc/resolvconf/run ] ; then # resolvconf with /run
+ # /etc/resolvconf/run symlinks to /run/resolvconf
+ rm -rf /run/resolvconf
+ mkdir -p /run/resolvconf
+ else # no /run present
+ rm -rf /etc/resolvconf/run
+ mkdir /etc/resolvconf/run
+ fi
+
touch /etc/resolvconf/run/enable-updates
mkdir /etc/resolvconf/run/interface
cat > /etc/resolvconf/run/resolv.conf << EOF
touch /etc/resolvconf/run/enable-updates
mkdir /etc/resolvconf/run/interface
cat > /etc/resolvconf/run/resolv.conf << EOF