From 9992848d2d86d2afd3bbfb4916a4c1b142a021b924d0314d3c10861962df9e5e Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Mon, 15 Jan 2018 10:27:52 +0000 Subject: [PATCH] Accepting request 563822 from home:RBrownSUSE:branches:Base:System - Edit scripts-systemd-fix-machines-btrfs-subvol.sh We shouldn't be creating a /var/lib/machines subvolume if /var is already a seperate partition or subvolume. /var/lib/machines will already be excluded from snapper & similar tooling in this case. OBS-URL: https://build.opensuse.org/request/show/563822 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1003 --- scripts-systemd-fix-machines-btrfs-subvol.sh | 12 ++++++++++++ systemd.changes | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/scripts-systemd-fix-machines-btrfs-subvol.sh b/scripts-systemd-fix-machines-btrfs-subvol.sh index a1b0832e..6ff4f688 100644 --- a/scripts-systemd-fix-machines-btrfs-subvol.sh +++ b/scripts-systemd-fix-machines-btrfs-subvol.sh @@ -74,6 +74,18 @@ if mount --fake /var/lib/machines 2>/dev/null; then exit fi +# +# If there is already an entry in fstab for /var, it means that: +# +# - the system has a seperate /var subvolume (default from Feb 2018) +# - the system has a seperate /var partition +# +# In any case we should exit +# +if mount --fake /var 2>/dev/null; then + exit +fi + # # If something is already mounted don't try to fix anything, it's been # done manually by the sysadmin. diff --git a/systemd.changes b/systemd.changes index e8400dc3..556fbd6d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 12 12:27:52 UTC 2018 - rbrown@suse.com + +- Edit scripts-systemd-fix-machines-btrfs-subvol.sh + + We shouldn't be creating a /var/lib/machines subvolume if /var is + already a seperate partition or subvolume. /var/lib/machines will + already be excluded from snapper & similar tooling in this case. + ------------------------------------------------------------------- Wed Jan 10 11:04:21 UTC 2018 - fbui@suse.com