Browse Source

Removed dependency on awk in cpurc

bootstrap.sh changed to include instructions to make drawterm
work correctly.
Keith Poole 8 years ago
parent
commit
d588edde01
4 changed files with 17 additions and 9 deletions
  1. 5 0
      bootstrap.sh
  2. 7 8
      rc/bin/cpurc
  3. 4 0
      rc/bin/print1
  4. 1 1
      usr/glenda/lib/profile

+ 5 - 0
bootstrap.sh

@@ -15,4 +15,9 @@ export ARCH=amd64
 # And build:
 ./util/build
 # See \`build -h' for more information on the build tool.
+To enable access to files, create a harvey and none user:
+sudo useradd harvey
+sudo useradd none
+
+none is only required for drawterm/cpu access
 EOF

+ 7 - 8
rc/bin/cpurc

@@ -59,14 +59,13 @@ rm -f '#¤/caphash'
 if(! netstat -n | grep -s 'tcp.*Listen.* (7|9|21|22|23|25|110|113|565|993|17007|17009|17010) .*')
 	aux/listen -q tcp
 
-# TODO: Removed until awk works
-#if(! ps|grep -s timesync) {
-#	aux/timesync -n pool.ntp.org
-#	if (test -e '#r/rtc') @ {
-#		sleep 10			# let timesync correct the time
-#		awk '{print $1}' /dev/time >'#r/rtc'	# fix hw clock
-#	} &
-#}
+if(! ps|grep -s timesync) {
+	aux/timesync -n pool.ntp.org
+	if (test -e '#r/rtc') @ {
+		sleep 10			# let timesync correct the time
+		print1 <{cat /dev/time} >'#r/rtc'	# fix hw clock
+	} &
+}
 
 # cpu-specific late startup
 if(test -e /cfg/$sysname/cpustart)

+ 4 - 0
rc/bin/print1

@@ -0,0 +1,4 @@
+#!/bin/rc
+
+line=`{read $1}
+echo $line(1)

+ 1 - 1
usr/glenda/lib/profile

@@ -27,7 +27,7 @@ case cpu
 	fn cpu%{ $* }
 	if (! test -e /mnt/term/mnt/wsys) {	# cpu call from drawterm
 		font=/lib/font/bit/pelm/latin1.8.font
-		#exec rio
+		exec rio
 	}
 case con
 	prompt=('cpu% ' '	')