Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=Variable storage overlay setup
|
||||
ConditionPathIsSymbolicLink=!/var
|
||||
DefaultDependencies=no
|
||||
RequiresMountsFor=/run/buildroot/mounts/var
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/mkdir -p /run/buildroot/mounts/var/lower /run/buildroot/mounts/var/upper /run/buildroot/mounts/var/work
|
||||
|
||||
# Ideally, we would like to use a systemd mount unit to manage the bind
|
||||
# mount. Unfortunately, that creates a circular dependency: such a unit
|
||||
# would have What=/var while var.mount has Where=/var so that introduces
|
||||
# an implicit dependency from that unit to var.mount, but var.mount
|
||||
# would have an explicit dependency to be ordered after that unit.
|
||||
# So we handle the bind mount manually.
|
||||
ExecStart=/usr/bin/mount -n -o bind,private /var /run/buildroot/mounts/var/lower
|
||||
ExecStop=/usr/bin/umount -l /run/buildroot/mounts/var/lower
|
||||
14
package/skeleton-init-systemd/overlayfs/var.mount
Normal file
14
package/skeleton-init-systemd/overlayfs/var.mount
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Variable storage overlay
|
||||
Documentation=man:file-hierarchy(7)
|
||||
ConditionPathIsSymbolicLink=!/var
|
||||
DefaultDependencies=no
|
||||
After=prepare-var-overlay.service
|
||||
BindsTo=prepare-var-overlay.service
|
||||
|
||||
[Mount]
|
||||
What=overlay_var
|
||||
Where=/var
|
||||
Type=overlay
|
||||
Options=lowerdir=/run/buildroot/mounts/var/lower,upperdir=/run/buildroot/mounts/var/upper,workdir=/run/buildroot/mounts/var/work,redirect_dir=on,index=on,xino=on
|
||||
LazyUnmount=true
|
||||
Reference in New Issue
Block a user