16 echo '% '^$"* >>/srv/log
27 if(~ $1 -d && ! ~ $#* 1){
34 if(~ $1 -w && ! ~ $#* 1){
47 if not if(! ~ $#optstr 0) {
51 pr=$pr^' ('^$"optstr^')'
65 pr=$pr^$suf^'['^$def^']'
67 pr=$pr^$suf^'[no default]'
74 echo -n current >$wctl
81 ifs='' {rd=`{echo $rd | sed 's/!//'}}
88 if(~ $#rd 0 || ~ $rd '')
101 echo -n $rd >/env/rd # just in case
106 grep '^# desc: ' $1 | sed 's/# desc: //'
110 grep '^# prereq:' $1 | sed 's/# prereq://'
114 echo You must `{grep '^# mustdo:' $1 | sed 's/# mustdo://'}
117 # there's no easy way to pass shell variables
118 # up from children to parents; the parents have
119 # to be coerced into noticing that the environment
120 # changed, even when in the same environment group.
122 # instead, we explicitly export the variables we want
123 # to percolate, and the parent calls coherence to reread
126 # we just append to the vars file, so that later exports
127 # override earlier ones; when we call coherence,
128 # the duplicates are thrown out.
137 nonnull=($nonnull $i)
140 whatis $nonnull |grep -v '^\./' >>/tmp/vars >[2]/dev/null
142 echo $i^'=()' >>/tmp/vars
146 if(test -f /tmp/vars) {
147 grep '^[a-z]*=' /tmp/vars >/tmp/vars2
148 v=`{sed 's/^([a-z]*)=.*/\1/' /tmp/vars2 | sort -u}
159 grep -s $1 /net/ipifc/*/status >[2]/dev/null