From 2efc907372a87ef8f01dcb771b7322b58d8c181b Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Fri, 29 Aug 2008 16:13:39 +0000 Subject: added time-sync via rdate to initrd, hwclock will be sinced as well resolv.conf is noch wirtten into etc/resolv.con in the initrd git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2136 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/stage3-stuff/bin/servconfig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'initramfs/stage3-stuff/bin/servconfig') diff --git a/initramfs/stage3-stuff/bin/servconfig b/initramfs/stage3-stuff/bin/servconfig index 4e701465..f0396b8d 100755 --- a/initramfs/stage3-stuff/bin/servconfig +++ b/initramfs/stage3-stuff/bin/servconfig @@ -118,11 +118,12 @@ rm -rf /mnt/etc/resolv.conf test -n "$domain_name" && \ echo -e "# /etc/resolv.conf - file generated by\n#\t$0:\n\ #\t$date\n#options timeout:1 attempts:1 rotate\n\ -search "$domain_name >/mnt/etc/resolv.conf +search "$domain_name >/etc/resolv.conf test -n "$domain_name_servers" && { for name in $domain_name_servers; do - echo nameserver $name >>/mnt/etc/resolv.conf; + echo nameserver $name >>/etc/resolv.conf; done; } +cp /etc/resolv.conf /mnt/etc/resolv.conf ############################################################################# # run distro specific configuration function @@ -204,6 +205,11 @@ config_bt ############################################################################# # network(ed) services +if [ -n "$ntp_servers" ]; then + rdate -s "$ntp_servers" + hwclock -w +fi + # network time service (ntp) configuration file if [ -n "$ntp_servers" -a ! -f /rootfs/etc/ntp.conf ]; then echo -e "# /etc/ntp.conf - file generated by $0: \ -- cgit v1.2.3-55-g7522