Skip to content

Commit

Permalink
05core: create top-level user symlinks on first boot
Browse files Browse the repository at this point in the history
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
jlebon committed Jul 29, 2022
1 parent 3505072 commit d5459e1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ enable rtas_errd.service
enable clevis-luks-askpass.path
# Provide status information about the Ignition run
enable coreos-ignition-write-issues.service
enable coreos-create-toplevel-symlinks.service
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

0 comments on commit d5459e1

Please sign in to comment.