Plan 9 from Bell Labs’s /usr/web/sources/contrib/someone/root/rc/bin/startfossil

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# startfossil partition name - start a temporary fossil without venti backing
#	on partition, with /srv names `name' and `fossil.name'.
rfork e
switch($#*) {
case 2
	part=$1
	name=$2
case *
	echo usage: $0 partition srv-name >[1=2]
	exit usage
}
if (! test -e $part) {
	echo $0: no file $part >[1=2]
	exit 'no partition'
}
if (test -e /srv/fossil.$name) {
	echo $0: /srv/fossil.$name already running >[1=2]
	exit 'already running'
}

# create a fossil configuration
cat <<! >/tmp/foss$pid
fsys main config $part
fsys main open -Vc 20000
fsys main

srv -p fscons.$name
srv fossil.$name
srv -APW fossil.$name.open
!

fossil/fossil -m 2 -c '. /tmp/foss'$pid

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.