blob: 0dd9aa175122857091936f56af96bbe83597e64e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/dis/sh
load std
autoload=std
ndb/cs
fn ck {
or {$*} {
echo spreeclient: exiting >[1=2]
raise error
}
}
user="{cat /dev/user}
fn notice {
or {~ $#* 1} {
echo usage: notice arg >[1=2]
raise usage
}
t := $*
run /lib/sh/win
tkwin Notice {
x text .t -yscrollcommand {.s set}
x scrollbar .s -orient vertical -command {.t yview}
x pack .s -side left -fill y
x pack .t -side top -fill both -expand 1
x .t insert 1.0 ${tkquote $t}
tk onscreen $wid
chan c; {} ${recv c}
}
}
ck mount -A 'tcp!$registry!registry' /mnt/registry
ck /dis/grid/remotelogon wm/wm {
k = /usr/$user/keyring/default
addrs=`{ndb/regquery resource spree auth.signer `{getpk -s $k}}
if{~ $#addrs 0} {
notice 'No spree servers found'
}
if {mount ${hd $addrs} /n/remote} {
spree/joinsession 0
} {
notice 'Cannot access spree server'
}
}
|