blob: 4662b62f2050d4a5cc89149e7aecf5d8f7c39391 (
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
|
#!/bin/rc
dir = /var/www
bins = (/usr/local/bin/git /usr/local/libexec/git/git-http-backend)
user = www
group = www
# the following is incredibly openbsd-specific
libs = `{ldd $bins | \
grep -v '^/' | \
grep -v 'Start' | \
sed 's/.* \///'}
for (lib in $libs) {
d = `{dirname $lib}
doas mkdir -p $dir/$d
doas cp /$lib $dir/$lib
}
if (!test -e $dir/dev/null) {
doas mkdir -p $dir/dev
doas mknod $dir/dev/null c 2 2
doas chmod 666 $dir/dev/null
}
doas cp `{whatis www/chroot/git-wrapper} $dir/bin/git-wrapper
doas cp /bin/ksh $dir/bin/ksh
doas chown -R www:www $dir/usr $dir/dev
doas chown -R root:bin $dir/bin
|