| 1 |
# Copyright (C) 2023 Red Hat Inc. |
| 2 |
# |
| 3 |
# This library is free software; you can redistribute it and/or |
| 4 |
# modify it under the terms of the GNU Lesser General Public |
| 5 |
# License as published by the Free Software Foundation; either |
| 6 |
# version 2 of the License, or (at your option) any later version. |
| 7 |
# |
| 8 |
# This library is distributed in the hope that it will be useful, |
| 9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
# Lesser General Public License for more details. |
| 12 |
# |
| 13 |
# You should have received a copy of the GNU Lesser General Public |
| 14 |
# License along with this library. If not, see <https://www.gnu.org/licenses/>. |
| 15 |
|
| 16 |
[Unit] |
| 17 |
Description=OSTree State Overlay On /%I |
| 18 |
Documentation=man:ostree(1) |
| 19 |
DefaultDependencies=no |
| 20 |
ConditionKernelCommandLine=ostree |
| 21 |
# run after /var is setup since that's where the upperdir is stored |
| 22 |
# and after boot.mount so we can load the sysroot |
| 23 |
After=var.mount boot.mount |
| 24 |
# but before local-fs.target, which we consider ourselves a part of |
| 25 |
Before=local-fs.target |
| 26 |
|
| 27 |
[Service] |
| 28 |
Type=oneshot |
| 29 |
RemainAfterExit=yes |
| 30 |
ExecStart=/usr/bin/ostree admin state-overlay %i /%I |
| 31 |
StandardInput=null |
| 32 |
StandardOutput=journal |
| 33 |
StandardError=journal+console |
| 34 |
|
| 35 |
[Install] |
| 36 |
WantedBy=local-fs.target |