diff options
Diffstat (limited to 'installer/lib')
| -rw-r--r-- | installer/lib/common.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/installer/lib/common.sh b/installer/lib/common.sh index d181e0b..8193b19 100644 --- a/installer/lib/common.sh +++ b/installer/lib/common.sh @@ -222,6 +222,20 @@ disk_in_use() { return 1 } +# Install a systemd drop-in for $service under $root, reading its body +# from stdin. Creates $root/etc/systemd/system/$service.service.d/ at +# mode 755 (idempotent) and writes $dropin_name.conf there. Intended +# for post-pacstrap customization — pass "/mnt" as root at install +# time; tests pass a tempdir. +install_dropin() { + local service="$1" + local dropin_name="$2" + local root="$3" + local dir="${root}/etc/systemd/system/${service}.service.d" + install -d -m 755 "$dir" + cat > "${dir}/${dropin_name}.conf" +} + # List available disks (not in use) list_available_disks() { local disks=() |
