summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
Diffstat (limited to 'initramfs')
-rw-r--r--initramfs/distro-specs/gentoo/functions-default7
-rw-r--r--initramfs/distro-specs/suse/functions-default7
-rw-r--r--initramfs/distro-specs/ubuntu/functions-default13
-rwxr-xr-xinitramfs/initrd-stuff/init10
4 files changed, 13 insertions, 24 deletions
diff --git a/initramfs/distro-specs/gentoo/functions-default b/initramfs/distro-specs/gentoo/functions-default
index 9a87fad9..0c1d9f1a 100644
--- a/initramfs/distro-specs/gentoo/functions-default
+++ b/initramfs/distro-specs/gentoo/functions-default
@@ -167,12 +167,7 @@ if [ -e /mnt/etc/${D_INITDIR}/ntp ] ; then
echo -e "ntp:!:13099:0:99999:7:::" >>/mnt/etc/shadow
fi
testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null
- if [ "x$start_ntp" = "xinitial" ] ; then
- echo -e "\t# entries added by $0 (InitRamFS from $date)\n\
-\t( ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 && {\n\t which \
-hwclock &>/dev/null && hwclock -w;} ) &" \
- >>/mnt/etc/${D_INITDIR}/boot.slx
- elif [ "x$start_ntp" = "xyes" ] ; then
+ if [ "x$start_ntp" = "xyes" ] ; then
rllinker "ntp"
fi
fi
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default
index 7dd42440..b241a8c5 100644
--- a/initramfs/distro-specs/suse/functions-default
+++ b/initramfs/distro-specs/suse/functions-default
@@ -84,12 +84,7 @@ if [ -e /mnt/etc/${D_INITDIR}/ntp ] ; then
echo -e "ntp:!:13099:0:99999:7:::" >>/mnt/etc/shadow
fi
testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null
- if [ "x$start_ntp" = "xinitial" ] ; then
- echo -e "\t# entries added by $0 (InitRamFS from $date)\n\
-\t( ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 && {\n\t which \
-hwclock &>/dev/null && hwclock -w;} ) &" \
- >>/mnt/etc/${D_INITDIR}/boot.slx
- elif [ "x$start_ntp" = "xyes" ] ; then
+ if [ "x$start_ntp" = "xyes" ] ; then
rllinker "ntp" "07" "14"
fi
fi
diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default
index 9364376f..8e4809ec 100644
--- a/initramfs/distro-specs/ubuntu/functions-default
+++ b/initramfs/distro-specs/ubuntu/functions-default
@@ -92,18 +92,11 @@ done
config_ntp () {
local start=07
local stop=14
-if [ -f /mnt/etc/init.d/ntp ] ; then
+if [ -f /mnt/etc/init.d/ntp -a "x$start_ntp" != "xno" ] ; then
echo -e "ntp:x:74:65534:NTP daemon:/var/lib/ntp:/bin/false" \
>>/mnt/etc/passwd
- testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null
- if [ "x$start_ntp" = "xinitial" ] ; then
- echo -e "# entry added by $0: $date" \
- >>/mnt/etc/${D_INITDIR}/boot.slx
- echo "ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 &" \
- >>/mnt/etc/${D_INITDIR}/boot.slx
- else
- rllinker "ntp" "$start" "$stop"
- fi
+ testmkd /mnt/var/lib/ntp/var/run/ntp
+ rllinker "ntp" "$start" "$stop"
fi
}
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index 7ac9ef3a..3ba3fa1e 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -52,7 +52,6 @@ mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
export date="${slxconf_date}"
-export nwif="eth0"
export DEBUGLEVEL=0
export KERNEL="${slxconf_kernver}"
@@ -65,6 +64,10 @@ export SLXVERSION="${slxconf_slxver}"
# do not use dnbd cache file
nodnbdcache="yes"
+# set a default LAN interface, might be modified for WLAN or on machines with
+# more than one ethernet card built in
+nwif="eth0"
+
# mount the important standard directories
[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc
[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
@@ -303,12 +306,15 @@ else
# redirect console (after /dev/null is available, and /dev mounted)
[ "${DEBUGLEVEL}" != 8 ] && exec < /dev/console > /dev/null 2>&1
fi
-# load network adaptor modules
+# load network adaptor modules, check for WLAN specific settings and check
+# for multiple ethernet interfaces (not implemented yet)
hwautocfg nwmod
if [ -n "${essid}" ] ; then
wlanlinksetup
#echo "Starting shell for testing of WLAN setup procedure"
#/bin/ash
+else
+ : # check here for the active ethernet link
fi
# set up loopback networking