diff options
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 24 | ||||
-rwxr-xr-x | initramfs/mkdxsinitrd | 22 |
3 files changed, 31 insertions, 18 deletions
@@ -169,9 +169,10 @@ supported."; \ @ # copy license @cp COPYING $(DESTDIR)$(SLX_BASE_PATH)/; - @ # copy initramfs generator scripts (and inject SLX_CONFIG_PATH on the way): + @ # copy initramfs generator scripts (and inject SLX_CONFIG_PATH, SLX_SHARE_PATH on the way): @cp ./initramfs/mkdxsinitrd $(DESTDIR)$(SLX_BIN_PATH)/; \ sed -e "s,@@@SLX_CONFIG_PATH@@@,$(SLX_CONFIG_PATH)," \ + -e "s,@@@SLX_SHARE_PATH@@@,$(SLX_SHARE_PATH)," \ -i $(DESTDIR)$(SLX_BIN_PATH)/mkdxsinitrd; @ # copy all PERL-scripts and their required modules: diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 67344f93..0303d392 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -193,10 +193,10 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup case $srvproto in nfs) # nfsroot consists now of two different parts - root_path=/$(uri_token $rootfs path) + nfspath=/$(uri_token $rootfs path) nfsserver=$(uri_token $rootfs server) echo -e "\n# nfs root information gotten via kernel command \ -line in $0\n#nfsroot=\"${nfsserver}:${root_path}\"\n" >> /etc/machine-setup +line in $0\n#nfsroot=\"${nfsserver}:${nfspath}\"\n" >> /etc/machine-setup ;; *nbd) nbdmod=$srvproto @@ -226,8 +226,6 @@ line in $0\n#nfsroot=\"${nfsserver}:${root_path}\"\n" >> /etc/machine-setup # deprecated: nfs server and path (will be removed soon) nfsroot=*) nfsroot=${opts#nfsroot=} - #root_path= - #nfsserver= echo -e "\n# nfs root information gotten via kernel command line in \n\ $0\n# deprecated: please use rootfs=nfs://...\nnfsroot=\"${nfsroot}\"\n" \ >> /etc/machine-setup @@ -306,6 +304,10 @@ else fi # load network adaptor modules hwautocfg nwmod +if [ -n "${essid}" ] ; then + echo "Starting shell for testing of WLAN setup procedure" + /bin/ash +fi # set up loopback networking [ $DEBUGLEVEL -eq 20 ] && echo "** starting ip config at $(sysup)" @@ -464,10 +466,18 @@ fi # call function for nfs mounts if [ -z "${nbdmod}" -a -z "${nbdserver}" ] ; then [ $DEBUGLEVEL -eq 20 ] && echo "** started nfs mount" + # read in extended machine-setup . /etc/machine-setup - # check if nfsserver is set as variable @@@serverip@@@ - nfsserver=$(checkip $nfsserver) - nfsroot=${nfsserver}:${root_path} + # prefer nfsserver and nfspath from kernel commandline over the information + # gotten from dhcp server + if [ -n "${nfsserver}" -a -n "${nfspath}" ] ; then + # check if nfsserver is set as variable @@@serverip@@@ + nfsserver=$(checkip $nfsserver) + nfsroot=${nfsserver}:${nfspath} + else + # the root_path should contain server ip and path in nfsroot notation + nfsroot=${root_path} + fi nfsmnt ${nfsroot} || error "$init_nfs" [ $DEBUGLEVEL -eq 20 ] && echo "** finished nfs mount at $(sysup)" fi diff --git a/initramfs/mkdxsinitrd b/initramfs/mkdxsinitrd index fef86d76..b7f11494 100755 --- a/initramfs/mkdxsinitrd +++ b/initramfs/mkdxsinitrd @@ -53,6 +53,7 @@ D_XFONTPATH="<set in ~/distro-config/distro file>" D_DEFAULTCOUNTRY="<set in ~/distro-config/distro file>" # read in the global settings SLX_CONFIG_PATH=@@@SLX_CONFIG_PATH@@@ +SLX_SHARE_PATH=@@@SLX_SHARE_PATH@@@ [ -f $SLX_SHARE_PATH/settings.default ] && \ . $SLX_SHARE_PATH/settings.default [ -f $SLX_CONFIG_PATH/settings ] && \ @@ -100,17 +101,18 @@ precheck() { echo -e "\nYou don't have the needed permission. Please rerun as root user!\n" exit 1 fi + # fixme:: Do we really need this!? # Check for correct settings of SLX-Variables - if [ "x" == "x$SLX_BASE_PATH" ]; then - if [ "x$SLX_CONFIG_PATH" == "x@@@SLX_CONFIG_PATH@@@" ]; then - echo "Please make sure you install the Open SLX Software properly," - echo "i.e. install it using the provided Makefile. Thanks." - else - echo "Essential configuration is missing. Please verify" - echo "existence and correctness of $SLX_SHARE_PATH/settings.default" - fi - exit 1 - fi + #if [ "x" == "x$SLX_BASE_PATH" ]; then + # if [ "x$SLX_CONFIG_PATH" == "x@@@SLX_CONFIG_PATH@@@" ]; then + # echo "Please make sure you install the Open SLX Software properly," + # echo "i.e. install it using the provided Makefile. Thanks." + # else + # echo "Essential configuration is missing. Please verify" + # echo "existence and correctness of $SLX_SHARE_PATH/settings.default" + # fi + # exit 1 + #fi } # replaces which command to find executables inside ROOTDIR |