changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / rc/bin/juke

changeset 7243: 34f64dcbbc25
parent: 8f2252ac3f6d
author: cinap_lenrek@felloff.net
date: Fri, 17 May 2019 18:14:10 +0200
permissions: -rwxr-xr-x
description: 7l: don't hardcode 4k pagesize, use INITRND
1 #!/bin/rc
2 rfork e
3 wide=`{echo $vgasize | sed 's/(.*)x.*x.*/\1 > 240/' | hoc}
4 debug=0
5 tflag=''
6 wflag=''
7 host=''
8 flags=()
9 sname=$user
10 if (! ~ $wide 1) {
11  flags=($flags -t)
12 }
13 while(! ~ $#* 0) {
14  switch ($1) {
15  case -d
16  debug=$2
17  shift
18  case -t
19  tflag='-t'
20  case -h
21  host=$2
22  shift
23  case -w
24  wflags='-w'
25  case -s
26  sname=$2
27  shift
28  case -*
29  echo Usage: classical [-d level] [-t] [-h srvhost]
30  exit usage
31  }
32  shift
33 }
34 if (! test -f /mnt/playlist) {
35  if (! ~ $debug '0') echo mounting playlistfs
36  if (! test -e /srv/playlist.$sname && ! ~ $host ''){
37  import -a $host /srv /srv
38  }
39  if (! mount -b /srv/playlist.$sname /mnt >/dev/null >[2]/dev/null){
40  rm -f /srv/playlist.$sname
41  if (! ~ $debug '0') echo starting playlistfs
42  games/playlistfs -s $sname -d $debug
43  }
44 }
45 if (~ `{ls /mnt/juke >[2]/dev/null | sed '1q'} '') {
46  if (! test -e /srv/jukefs.$sname && ! ~ $host ''){
47  import -a $host /srv /srv
48  }
49  if (! mount -b /srv/jukefs.$sname /mnt >/dev/null >[2]/dev/null){
50  if (! ~ $debug '0') echo games/jukefs
51  games/jukefs -s $sname
52  }
53 }
54 if (~ $wflags '-w') {
55  exec games/jukebox -w -d $debug $tflag &
56 }
57 exec games/jukebox -d $debug $tflag