diff options
author | mischief <mischief@offblast.org> | 2015-08-25 02:07:46 -0700 |
---|---|---|
committer | mischief <mischief@offblast.org> | 2015-08-25 02:07:46 -0700 |
commit | 6b402b83cffc97015345dab1c27c35afe64bb3db (patch) | |
tree | b525f9443564682c46f8c36af6a4d238bd39a756 /rc | |
parent | dbe0a995f03f26ea2b6859d21df3bd67856d672d (diff) | |
download | plan9front-6b402b83cffc97015345dab1c27c35afe64bb3db.tar.xz |
import E script from bell labs
Diffstat (limited to 'rc')
-rwxr-xr-x | rc/bin/9fs | 6 | ||||
-rwxr-xr-x | rc/bin/E | 16 | ||||
-rwxr-xr-x | rc/bin/ape/egrep | 2 | ||||
-rwxr-xr-x | rc/bin/ape/fgrep | 2 | ||||
-rwxr-xr-x | rc/bin/ape/ln | 2 | ||||
-rwxr-xr-x | rc/bin/cpurc | 9 | ||||
-rwxr-xr-x | rc/bin/service/tcp17010 | 5 | ||||
-rwxr-xr-x | rc/bin/sysupdate | 2 |
8 files changed, 36 insertions, 8 deletions
diff --git a/rc/bin/9fs b/rc/bin/9fs index 578120680..1a06cab85 100755 --- a/rc/bin/9fs +++ b/rc/bin/9fs @@ -71,6 +71,12 @@ case *.vac vacfs -m /n/`{basename $1 .vac} `{cat $score} case wiki srv -m 'net!plan9.bell-labs.com!wiki' wiki /mnt/wiki +case ingenic + ftpfs -qKm /n/ingenic -a $user@$sysname ftp.ingenic.com +case kernel + ftpfs -qKm /n/kernel -a $user@sysname ftp.kernel.org +case qrstuv + srv -nqmC tcp!fs.9paste.net qrstuv case * switch($#*){ case 1 diff --git a/rc/bin/E b/rc/bin/E new file mode 100755 index 000000000..e91d4f6a2 --- /dev/null +++ b/rc/bin/E @@ -0,0 +1,16 @@ +#!/bin/rc +# E file - B file, wait until it changes, exit +rfork e +if (! ~ $#* 1) { + echo usage: $0 file >[1=2] + exit usage +} +if (! test -e $1) { + echo $0: $1: no such file >[1=2] + exit no-file +} +otm = `{mtime $1 | awk '{print $1}'} +B $1 +while (~ $otm `{mtime $1 | awk '{print $1}'}) + sleep 1 +exit '' diff --git a/rc/bin/ape/egrep b/rc/bin/ape/egrep index ffd1b2dc3..4a445c35e 100755 --- a/rc/bin/ape/egrep +++ b/rc/bin/ape/egrep @@ -1,2 +1,2 @@ #!/bin/rc -exec /rc/bin/ape/grep $* +exec /$objtype/bin/ape/grep -E $* diff --git a/rc/bin/ape/fgrep b/rc/bin/ape/fgrep index ffd1b2dc3..99853d168 100755 --- a/rc/bin/ape/fgrep +++ b/rc/bin/ape/fgrep @@ -1,2 +1,2 @@ #!/bin/rc -exec /rc/bin/ape/grep $* +exec /$objtype/bin/ape/grep -F $* diff --git a/rc/bin/ape/ln b/rc/bin/ape/ln index bb5da4a44..d48d0326a 100755 --- a/rc/bin/ape/ln +++ b/rc/bin/ape/ln @@ -20,4 +20,4 @@ if(~ $force n && test -e $2){ exit 'usage' } -exec cp -gux $1 $2 +exec cp -R $1 $2 diff --git a/rc/bin/cpurc b/rc/bin/cpurc index d20cf07e1..af3adc10c 100755 --- a/rc/bin/cpurc +++ b/rc/bin/cpurc @@ -55,18 +55,22 @@ if(test -r /net/ipselftab){ } } -if(! test -e /net/dns) +if(! test -e /net/dns){ + echo dns... ndb/dns -r +} +echo timesync... if(! ps|grep -s timesync){ if(~ $#ntp 0) . <{ndb/ipquery sys $sysname ntp | sed 's, +,\n,g'} if(~ $#ntp 0) ntp=pool.ntp.org - aux/timesync -n $ntp + #aux/timesync -n $ntp sleep 2 } +echo listen... if(~ $#auth 0){ auth=`{ndb/query sys $sysname auth} . <{ndb/ipquery sys $sysname auth | sed 's, +,\n,g'} @@ -89,6 +93,7 @@ case * if(test -f /dev/apm) aux/apm +echo cpustart... if(test -e /cfg/$sysname/cpustart) . /cfg/$sysname/cpustart diff --git a/rc/bin/service/tcp17010 b/rc/bin/service/tcp17010 index 8747639f1..f25b7aa23 100755 --- a/rc/bin/service/tcp17010 +++ b/rc/bin/service/tcp17010 @@ -1,3 +1,4 @@ #!/bin/rc -netdir=`{echo $3 | sed 's;/[0-9]+$;!*!0;'} -exec /bin/cpu -A $netdir -R +#netdir=`{echo $3 | sed 's;/[0-9]+$;!*!0;'} +#exec /bin/cpu -A $netdir -R +exec /bin/cpu -R diff --git a/rc/bin/sysupdate b/rc/bin/sysupdate index e0420b50f..de08d28a2 100755 --- a/rc/bin/sysupdate +++ b/rc/bin/sysupdate @@ -1,6 +1,6 @@ #!/bin/rc rfork en -source=https://code.9front.org/hg/plan9front + cd / if(! test -d .hg) bind -ac /dist/plan9front / |