2021-01-14 08:26:12 +00:00
|
|
|
#!/bin/bash
|
2021-06-14 08:46:08 +00:00
|
|
|
# This script delivers current documentation/configs and assures it has the intended
|
|
|
|
# settings for a particular branch/release.
|
|
|
|
# For questions reach to Jindrich Novy <jnovy@redhat.com>
|
|
|
|
|
|
|
|
ensure() {
|
|
|
|
if grep ^$2[[:blank:]].*= $1 > /dev/null
|
|
|
|
then
|
|
|
|
sed -i "s;^$2[[:blank:]]=.*;$2 = $3;" $1
|
|
|
|
else
|
|
|
|
if grep ^\#.*$2[[:blank:]].*= $1 > /dev/null
|
|
|
|
then
|
|
|
|
sed -i "/^#.*$2[[:blank:]].*=/a \
|
|
|
|
$2 = $3" $1
|
|
|
|
else
|
|
|
|
echo "$2 = \"$3\"" >> $1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-08-03 09:03:40 +00:00
|
|
|
#./pyxis.sh
|
|
|
|
#./update-vendored.sh
|
2021-01-14 08:26:12 +00:00
|
|
|
spectool -f -g skopeo.spec
|
2021-06-14 08:46:08 +00:00
|
|
|
ensure storage.conf driver \"overlay\"
|
|
|
|
ensure storage.conf mountopt \"nodev,metacopy=on\"
|
|
|
|
ensure registries.conf unqualified-search-registries [\"registry.fedoraproject.org\",\ \"registry.access.redhat.com\",\ \"registry.centos.org\",\ \"quay.io\",\ \"docker.io\"]
|
2021-07-07 09:19:08 +00:00
|
|
|
ensure registries.conf short-name-mode \"enforcing\"
|
2021-06-14 08:46:08 +00:00
|
|
|
ensure containers.conf events_logger \"file\"
|
|
|
|
ensure containers.conf infra_image \"registry.access.redhat.com/ubi9/pause\"
|
|
|
|
ensure containers.conf runtime \"crun\"
|
2021-01-14 08:26:12 +00:00
|
|
|
[ `grep "keyctl" seccomp.json | wc -l` == 0 ] && sed -i '/\"kill\",/i \
|
|
|
|
"keyctl",' seccomp.json
|
|
|
|
sed -i '/\"socketcall\",/i \
|
|
|
|
"socket",' seccomp.json
|
2021-06-14 08:46:08 +00:00
|
|
|
if ! grep \"NET_RAW\" containers.conf > /dev/null
|
2021-01-19 12:00:55 +00:00
|
|
|
then
|
|
|
|
sed -i '/^default_capabilities/a \
|
|
|
|
"NET_RAW",' containers.conf
|
|
|
|
fi
|