-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Configures and enables service context. | ||
|
||
policy_rc_d_disable() (echo "exit 101" >/usr/sbin/policy-rc.d && chmod a+x /usr/sbin/policy-rc.d) | ||
policy_rc_d_enable() (echo "exit 0" >/usr/sbin/policy-rc.d && chmod a+x /usr/sbin/policy-rc.d) | ||
|
||
exec 1>&2 | ||
set -o errexit -o nounset -o pipefail | ||
set -x | ||
|
||
policy_rc_d_disable | ||
|
||
apt-get install -y apparmor tzdata | ||
|
||
mv /etc/one-appliance/net-90 /etc/one-context.d/net-90-service-appliance | ||
mv /etc/one-appliance/net-99 /etc/one-context.d/net-99-report-ready | ||
|
||
chown root:root /etc/one-context.d/* | ||
chmod u=rwx,go=rx /etc/one-context.d/* | ||
|
||
policy_rc_d_enable | ||
|
||
sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Removes man pages and share/doc data, then prevents | ||
# from re-populating. | ||
|
||
exec 1>&2 | ||
set -o errexit -o nounset -o pipefail | ||
set -x | ||
|
||
install -o 0 -g 0 -m u=rw,go=r -D /dev/fd/0 /etc/dpkg/dpkg.cfg.d/excludes <<'EOF' | ||
path-exclude=/usr/share/man/* | ||
path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo | ||
path-exclude=/usr/share/doc/* | ||
path-include=/usr/share/doc/*/copyright | ||
path-include=/usr/share/doc/*/changelog.Debian.* | ||
EOF | ||
|
||
rm -rf /usr/share/man/* ||: | ||
rm -f /usr/share/locale/*/LC_MESSAGES/*.mo ||: | ||
|
||
TMP_DIR=$(mktemp -d) && cd "$TMP_DIR/" | ||
mv -f /usr/share/doc/* . ||: | ||
cp -rf --parents */copyright /usr/share/doc/ ||: | ||
cp -rf --parents */changelog.Debian.* /usr/share/doc/ ||: | ||
cd ../ && rm -rf "$TMP_DIR/" | ||
|
||
sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Configures and enables service context. | ||
|
||
exec 1>&2 | ||
set -o errexit -o nounset -o pipefail | ||
set -x | ||
|
||
printf '#!/bin/sh\n\ntrue\n' > /etc/one-context.d/loc-12-firewall | ||
printf '#!/bin/sh\n\ntrue\n' > /etc/one-context.d/loc-15-ip_forward | ||
printf '#!/bin/sh\n\ntrue\n' > /etc/one-context.d/loc-15-keepalived | ||
|
||
mv /etc/one-appliance/net-90 /etc/one-context.d/net-90-service-appliance | ||
mv /etc/one-appliance/net-99 /etc/one-context.d/net-99-report-ready | ||
|
||
chown root:root /etc/one-context.d/* | ||
chmod u=rwx,go=rx /etc/one-context.d/* | ||
|
||
sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Configures and enables service context. | ||
|
||
exec 1>&2 | ||
set -o errexit -o nounset -o pipefail | ||
set -x | ||
|
||
mv /etc/one-appliance/net-90 /etc/one-context.d/net-90-service-appliance | ||
mv /etc/one-appliance/net-99 /etc/one-context.d/net-99-report-ready | ||
|
||
chown root:root /etc/one-context.d/* | ||
chmod u=rwx,go=rx /etc/one-context.d/* | ||
|
||
sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters