Op 18 okt. 2013, om 10:12 heeft [email protected] het volgende geschreven:
> From: Roy Li <[email protected]> > > Create connman-evn.service, which will run a script to compute the networking > device when nfs root is on, and pass the result to connman.service > > Copy Connmand.service from source code, add ExecStartPre into it to release > do_configure_append work, use the options which is passed by > connman-evn.service > > Signed-off-by: Roy Li <[email protected]> > --- > > +++ b/meta/recipes-connectivity/connman/connman/connman-env.service > @@ -0,0 +1,13 @@ > +[Unit] > +Description=Generate options for connection service > +Before=connman.service > +ConditionKernelCommandLine=root=/dev/nfs So this only runs when using NFS root and calls... > +After=syslog.target > + > +[Service] > +Type=oneshot > +ExecStart=@SBINDIR@/connmand-env ... the above script. Let's see what the script does below ... > +++ b/meta/recipes-connectivity/connman/connman/connmand-env > @@ -0,0 +1,42 @@ > +#!/bin/sh > + > +nfsroot=0 > + > +exec 9<&0 < /proc/mounts > +while read dev mtpt fstype rest; do > + if test $mtpt = "/" ; then > + case $fstype in > + nfs | nfs4) > + nfsroot=1 > + break > + ;; > + *) > + ;; > + esac > + fi > +done > + > +EXTRA_PARAM="" > +if test $nfsroot -eq 1 ; then Ah. A whole lot of tests for a script that only runs *after* NFS root has been detected already. Looks like you can kill that part of the script. _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
