forked from coreos/fedora-coreos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
05core: create top-level user symlinks on first boot
With this, users can specify an Ignition config like ```yaml variant: fcos version: 1.4.0 storage: files: - path: /etc/ostree/config.d/01-foobar.conf contents: inline: | [toplevel-links] foobar=/var/foobar ``` and on first boot, a `/foobar` symlink will be created. Requires: ostreedev/ostree#2681 Related: coreos/rpm-ostree#337
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
overlay.d/05core/usr/lib/systemd/system/coreos-create-toplevel-symlinks.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[Unit] | ||
Description=CoreOS Create Top-Level User Symlinks | ||
Documentation=https://docs.fedoraproject.org/en-US/fedora-coreos/ | ||
ConditionPathExists=!/run/ostree-live | ||
DefaultDependencies=false | ||
RequiresMountsFor=/boot | ||
|
||
# We run on first boot only | ||
ConditionFirstBoot=true | ||
Before=first-boot-complete.target systemd-machine-id-commit.service | ||
Wants=first-boot-complete.target | ||
|
||
# We run before anything gets mounted | ||
Before=local-fs.target | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/bin/ostree admin create-toplevel-user-links | ||
|
||
[Install] | ||
WantedBy=local-fs.target |