From a83e113840517646f2cad88f522f1539bd825114 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 28 Jan 2009 18:47:51 +0000 Subject: Rest of dns server ip passing to stage3, simple fix for suse configuration. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2548 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/distro-specs/suse/functions-default | 2 +- initramfs/stage3-stuff/bin/dhcpmkconfig | 4 ++-- initramfs/stage3-stuff/init | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'initramfs') diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index 2cfb5747..7b4ffc84 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -524,7 +524,7 @@ if [ "x$start_dreshal" = "xyes" ]; then >> /mnt/etc/passwd strinfile "haldaemon:" /mnt/etc/group || \ echo "haldaemon:!:103:" >> /mnt/etc/group - echo -n "" > /mnt/var/lib/PolicyKit/reload + echo -n "" > /mnt/var/lib/PolicyKit.reload # create directories and set permissions with user and group id testmkd /mnt/var/run/hal haldaemon:haldaemon testmkd /mnt/var/cache/hald haldaemon:haldaemon diff --git a/initramfs/stage3-stuff/bin/dhcpmkconfig b/initramfs/stage3-stuff/bin/dhcpmkconfig index aee0eb6d..c8bf73d8 100755 --- a/initramfs/stage3-stuff/bin/dhcpmkconfig +++ b/initramfs/stage3-stuff/bin/dhcpmkconfig @@ -31,8 +31,8 @@ set | sed \ -e "s,nissrv,nis_servers,;s,nisdomain_name,nis_domain," \ -e "s,wins,netbios_name_servers,;/OPTIND.*/d" >>/tmp/confviadhcp -# erzeugen einer lokalen /etc/resolv.conf -echo -e "search $domain\n" >/etc/resolv.conf +# generate a local /etc/resolv.conf (might overwrite the version from preboot) +[ -n "$domain" ] && echo -e "search $domain\n" >/etc/resolv.conf test -n "$dns" && { for name in $dns; do echo nameserver $name >>/etc/resolv.conf; diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init index d3034a00..13a08a9d 100755 --- a/initramfs/stage3-stuff/init +++ b/initramfs/stage3-stuff/init @@ -414,6 +414,9 @@ if [ -n "$ipinfo" ] ; then serverip=$(getip 2) gateway=$(getip 3) subnet_mask=$(getip 4) + # we might have an idea of the dns server via preboot + dns_srv=$(getip 5) + [ -n "$dns_srv" ] && echo nameserver $dns_srv >/etc/resolv.conf; echo -e "# ip configuration written by $0 script:\nclientip=$clientip\n\ subnet_mask=$subnet_mask\ngateway=$gateway\nserverip=$serverip" \ >>/etc/initramfs-setup -- cgit v1.2.3-55-g7522