Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
 
3
rfork e
4
cd /usr/rsc
5
. bkup.info
6
fn x {
7
	echo x $*
8
	y=$1
9
	if(~ $#$y 0){
10
		$y=0
11
	}
12
	echo venti/wrarena -o $2 $3 $$y
13
	end=`{venti/wrarena -o $2 $3 $$y | grep '^end offset ' | sed 's/^end offset //'}
14
	if(~ $#end 1 && ! ~ $$y $end){
15
		$y=$end
16
		echo '#' `{date} >>bkup.info
17
		whatis $y >>bkup.info
18
	}
19
}
20
hget http://127.1:8000/index | 
21
awk '
22
/^index=/ { blockSize=0+substr($3, 11); }
23
/^arena=/ { arena=substr($1, 7); }
24
/^	arena=/ { start=0+substr($5, 2)-blockSize; printf("x %s %d %s\n", arena, start, $3); }
25
' |rc
26