diff options
author | Rob Austein <sra@hactrn.net> | 2006-10-05 17:58:49 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2006-10-05 17:58:49 +0000 |
commit | 3eb4530a6f86528ae03bd13d2a499aa41b946f71 (patch) | |
tree | 7d8ea74a6710fe3c9b59c7218b5dd23fed3b1333 | |
parent | c38e06b8408e736d6100d393ba909d09ec104e9a (diff) |
Set up trust anchors and minimal rcynic.conf
svn path=/rcynic/README; revision=354
-rw-r--r-- | rcynic/README | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rcynic/README b/rcynic/README index 5ff0d60e..97ec2354 100644 --- a/rcynic/README +++ b/rcynic/README @@ -390,3 +390,35 @@ fi if /bin/test -r /etc/localtime && ! /usr/bin/cmp -s /etc/localtime "${jaildir}/etc/localtime"; then /bin/cp -p /etc/localtime "${jaildir}/etc/localtime" fi + +if /bin/test -d trust-anchors; then + for i in trust-anchors/*.cer; do + j="$jaildir/etc/trust-anchors/${i##*/}" + /bin/test -r "$j" && continue + echo "Copying $i to $j" + /bin/cp -p "$i" "$j" + /usr/sbin/chown root:wheel "$j" + /bin/chmod 444 "$j" + done +fi + +if /bin/test -r "$jaildir/etc/rcynic.conf"; then + echo "You already have config file \"${jaildir}/etc/rcynic.conf\", so I will use it." +else + echo "Creating minmal ${jaildir}/etc/rcynic.conf" + /bin/cat >"${jaildir}/etc/rcynic.conf" <<-EOF + [rcynic] + rsync-program = /bin/rsync + authenticated = /data/authenticated + old-authenticated = /data/authenticated.old + unauthenticated = /data/unauthenticated + EOF + j=1 + for i in $jaildir/etc/trust-anchors/*.cer; do + echo >>"${jaildir}/etc/rcynic.conf" "trust-anchor.$j = /data/${i##*/}" + j=$((j+1)) + done +fi + +/usr/sbin/chown root:wheel "${jaildir}/etc/rcynic.conf" +/bin/chmod 444 "${jaildir}/etc/rcynic.conf" |