Skip to content

Commit

Permalink
Remove the existing recursive line
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmcanonical committed Jul 24, 2024
1 parent fc1b491 commit d7c3fdd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# platform = multi_platform_ubuntu

TMPFILES_CONF="/etc/tmpfiles.d/00-systemd.conf"
ORIGINAL_CONF="/usr/lib/tmpfiles.d/systemd.conf"

sed -i --follow-symlinks -E '/[zZ][+]*\s+\/(var|run)\/log\/journal\s*/d' "$ORIGINAL_CONF"

if grep -qP "^.[+]*\s+\/var\/log\/journal\s+" "$TMPFILES_CONF"; then
sed -i --follow-symlinks "s/\(^.[+]*\)\(\s\+\/var\/log\/journal\s\+[^ $]\+\s\+[^ $]\+\s\+\)\([^ $]\+\)/Z\2systemd-journal/" "$TMPFILES_CONF"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# platform = multi_platform_ubuntu

TMPFILES_CONF="/etc/tmpfiles.d/00-systemd.conf"
ORIGINAL_CONF="/usr/lib/tmpfiles.d/systemd.conf"

sed -i --follow-symlinks -E '/[zZ][+]*\s+\/(var|run)\/log\/journal\s*/d' "$ORIGINAL_CONF"

if grep -qP "^.[+]*\s+\/var\/log\/journal\s+" "$TMPFILES_CONF"; then
sed -i --follow-symlinks "s/\(^.[+]*\)\(\s\+\/var\/log\/journal\s\+[^ $]\+\s\+\)\([^ $]\+\)/Z\2root/" "$TMPFILES_CONF"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# platform = multi_platform_ubuntu

TMPFILES_CONF="/etc/tmpfiles.d/00-systemd.conf"
ORIGINAL_CONF="/usr/lib/tmpfiles.d/systemd.conf"

sed -i --follow-symlinks -E '/[zZ][+]*\s+\/(var|run)\/log\/journal\s*/d' "$ORIGINAL_CONF"

if grep -qP "^.[+]*\s+\/var\/log\/journal\s+" "$TMPFILES_CONF"; then
sed -i --follow-symlinks "s/\(^.[+]*\)\(\s\+\/var\/log\/journal\s\+\)\([^ $]*\)/Z\2~2750/" "$TMPFILES_CONF"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# platform = multi_platform_ubuntu

TMPFILES_CONF="/etc/tmpfiles.d/00-systemd.conf"
ORIGINAL_CONF="/usr/lib/tmpfiles.d/systemd.conf"

sed -i --follow-symlinks -E '/[zZ][+]*\s+\/(var|run)\/log\/journal\s*/d' "$ORIGINAL_CONF"

if grep -qP "^.[+]*\s+\/var\/log\/journal\s+" "$TMPFILES_CONF"; then
sed -i --follow-symlinks "s/\(^.[+]*\)\(\s\+\/var\/log\/journal\s\+[^ $]\+\s\+[^ $]\+\s\+\)\([^ $]\+\)/Z\2systemd-journal/" "$TMPFILES_CONF"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# platform = multi_platform_ubuntu

TMPFILES_CONF="/etc/tmpfiles.d/00-systemd.conf"
ORIGINAL_CONF="/usr/lib/tmpfiles.d/systemd.conf"

sed -i --follow-symlinks -E '/[zZ][+]*\s+\/(var|run)\/log\/journal\s*/d' "$ORIGINAL_CONF"

if grep -qP "^.[+]*\s+\/var\/log\/journal\s+" "$TMPFILES_CONF"; then
sed -i --follow-symlinks "s/\(^.[+]*\)\(\s\+\/var\/log\/journal\s\+[^ $]\+\s\+\)\([^ $]\+\)/Z\2root/" "$TMPFILES_CONF"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# platform = multi_platform_ubuntu

TMPFILES_CONF="/etc/tmpfiles.d/00-systemd.conf"
ORIGINAL_CONF="/usr/lib/tmpfiles.d/systemd.conf"

sed -i --follow-symlinks -E '/[zZ][+]*\s+\/var\/log\/journal\s*/d' "$ORIGINAL_CONF"

if grep -qP "^.[+]*\s+\/var\/log\/journal\s+" "$TMPFILES_CONF"; then
sed -i --follow-symlinks "s/\(^.[+]*\)\(\s\+\/var\/log\/journal\s\+\)\([^ $]*\)/Z\2~2750/" "$TMPFILES_CONF"
Expand Down

0 comments on commit d7c3fdd

Please sign in to comment.