Skip to content

Commit

Permalink
abolish /rw/config parsing
Browse files Browse the repository at this point in the history
(Does not influence Qubes specific /rw/config parsing.)
  • Loading branch information
adrelanos committed Jun 12, 2023
1 parent 4204e11 commit 59492ce
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
7 changes: 1 addition & 6 deletions debian/systemcheck.preinst
Expand Up @@ -22,7 +22,7 @@ legacy_settings_folder_migrate() {

shopt -s globstar dotglob nullglob

for file_name in /etc/whonix.d/* /usr/local/etc/whonix.d/* /rw/config/whonix.d/* ; do
for file_name in /etc/whonix.d/* /usr/local/etc/whonix.d/* ; do
search="WHONIXCHECK_NO_EXIT_ON_IP_FORWARDING_DETECTION"
replace="NO_EXIT_ON_IP_FORWARDING_DETECTION"
LANG=C str_replace "$search" "$replace" "$file_name"
Expand Down Expand Up @@ -57,11 +57,6 @@ legacy_settings_folder_migrate() {
fi
fi

if test -d /rw/config/whonix.d ; then
mkdir -p /usr/local/etc/systemcheck.d
mv --verbose --no-clobber /rw/config/whonix.d/* /usr/local/etc/whonix.d/
fi

mkdir --parents "/var/lib/whonix/do_once"
touch "/var/lib/whonix/do_once/${FUNCNAME}_version_1"
}
Expand Down
3 changes: 0 additions & 3 deletions etc/apparmor.d/usr.libexec.systemcheck.canary
Expand Up @@ -38,9 +38,6 @@
/etc/systemcheck.d/** r,
/usr/local/etc/systemcheck.d/ r,
/usr/local/etc/systemcheck.d/** r,
## Legacy.
/rw/config/whonix.d/ r,
/rw/config/whonix.d/** r,
/usr/local/etc/whonix.d/ r,
/usr/local/etc/whonix.d/** r,
/etc/whonix.d/ r,
Expand Down
2 changes: 1 addition & 1 deletion usr/libexec/systemcheck/canary-run-or-not
Expand Up @@ -3,7 +3,7 @@
## Copyright (C) 2012 - 2022 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

canary_config_folders="/etc/systemcheck.d /usr/local/etc/systemcheck.d /rw/config/whonix.d /usr/local/etc/whonix.d /etc/whonix.d"
canary_config_folders="/etc/systemcheck.d /usr/local/etc/systemcheck.d /usr/local/etc/whonix.d /etc/whonix.d"

if grep -r -q '^whonixcheck_skip_functions+=" download_whonix_news "' $canary_config_folders 2>/dev/null ; then
true "INFO: Legacy disabled in settings. Doing nothing. Exiting."
Expand Down

0 comments on commit 59492ce

Please sign in to comment.