Merge c26154fed678d953b14a3e45cb806ca3f521ec85 into b3adfa83ab61682dec6c3834678ca2e9eae43e03

This commit is contained in:
Etienne Champetier 2025-03-21 11:43:16 -04:00 committed by GitHub
commit 2151f78816
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 0 deletions

View File

@ -41,6 +41,7 @@ systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
src/boot/ostree-boot-complete.service \
src/boot/ostree-finalize-staged.service \
src/boot/ostree-finalize-staged-hold.service \
src/boot/ostree-edit-fstab.service \
src/boot/ostree-state-overlay@.service \
$(NULL)
systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d

View File

@ -0,0 +1,31 @@
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see <https://www.gnu.org/licenses/>.
[Unit]
Description=OSTree comment / in fstab
DefaultDependencies=no
ConditionKernelCommandLine=ostree
Conflicts=shutdown.target
After=systemd-fsck-root.service
Before=bootc-fstab-edit.service systemd-remount-fs.service local-fs-pre.target local-fs.target shutdown.target
Wants=local-fs-pre.target
ConditionPathIsReadWrite=/etc
ConditionPathExists=/etc/fstab
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sed -i 's/^\\([^#\\t ]\\+[\\t ]\\+\\/[\\t ]\\+[^\\t ]\\+[\\t ]\\+defaults[\\t ]\\+\\)/# commented by ostree-edit-fstab.service\\n#\\1/' /etc/fstab
[Install]
WantedBy=local-fs.target