Changeset 4812 in /cluster/svnroot


Ignore:
Timestamp:
Jul 19, 2014 9:25:09 PM (6 years ago)
Author:
skylar
Message:

parsing nfsroot= properly (#856)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar/bccd-3.4.0/trees/etc/initramfs-tools.diskless/scripts/nfs-bottom/aufs

    r4809 r4812  
    22
    33# $Id$
     4
     5set -x
    46
    57PREREQ=""
     
    2224. /${rootmnt}/etc/unionfs.conf
    2325export IPV4ADDR=$(ip address|egrep -A2 eth0|awk '$1 ~ /^inet$/ {gsub(/\/24$/,"",$2); print $2}')
     26
     27for ARG in $(cat /proc/cmdline); do
     28    if echo ${ARG}|egrep -q '^nfsroot=' > /dev/null 2>&1; then
     29        NFSROOT=$(echo ${ARG}|sed -e 's!^nfsroot=!!g')
     30        ROOTSERVER=$(echo ${NFSROOT}|sed -e 's!:.*$!!g')
     31        break
     32    fi
     33done
     34
     35if [[ -z ${ROOTSERVER} ]]; then
     36    echo "Need root server from nfsroot=!" >&2
     37fi
    2438
    2539# projectdir is the NFS dir for the read-only branch shared by all diskless nodes
Note: See TracChangeset for help on using the changeset viewer.