mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
29a24ab28e
This changes the fstab-generator to handle mounting of /usr/ a bit differently than before. Instead of immediately mounting the fs to /sysroot/usr/ we'll first mount it to /sysusr/usr/ and then add a separate bind mount that mounts it from /sysusr/usr/ to /sysroot/usr/. This way we can access /usr independently of the root fs, without for waiting to be mounted via the /sysusr/ hierarchy. This is useful for invoking systemd-repart while a root fs doesn't exist yet and for creating it, with partition data read from the /usr/ hierarchy. This introduces a new generic target initrd-usr-fs.target that may be used to generically order services against /sysusr/ to become available.
30 lines
945 B
SYSTEMD
30 lines
945 B
SYSTEMD
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd 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.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Repartition Root Disk
|
|
Documentation=man:systemd-repart.service(8)
|
|
DefaultDependencies=no
|
|
Conflicts=shutdown.target
|
|
After=initrd-usr-fs.target
|
|
Before=initrd-root-fs.target shutdown.target
|
|
ConditionVirtualization=!container
|
|
ConditionDirectoryNotEmpty=|/usr/lib/repart.d
|
|
ConditionDirectoryNotEmpty=|/usr/local/lib/repart.d
|
|
ConditionDirectoryNotEmpty=|/etc/repart.d
|
|
ConditionDirectoryNotEmpty=|/run/repart.d
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=@rootbindir@/systemd-repart --dry-run=no
|
|
|
|
# The tool returns 77 if there's no existing GPT partition table
|
|
SuccessExitStatus=77
|