]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(systemd-portabled): do not call portablectl
authorJo Zzsi <jozzsicsataban@gmail.com>
Mon, 22 Sep 2025 22:46:18 +0000 (18:46 -0400)
committerBenjamin Drung <bdrung@ubuntu.com>
Thu, 5 Feb 2026 14:09:46 +0000 (15:09 +0100)
Drop the portablectl call altogether and stop adding
{/etc,/var,usr}/lib/portables/*.raw to the initramfs automatically.

These .raw files are full OS trees and are rather huge, adding a
specific .raw one manually seems like a legit use-case.

modules.d/11systemd-portabled/module-setup.sh

index 85ed6adeab49cec4850cc8eaa336a2ee51511d0f..fbc62e1f3d63ca8fbf7cd9077ee1c0d49ec492f6 100755 (executable)
@@ -31,18 +31,7 @@ installkernel() {
 
 # Install the required file(s) and directories for the module in the initramfs.
 install() {
-
-    # It's intended to work only with raw binary disk images contained in
-    # regular files, but not with directory trees.
-    local _nonraw
-    _nonraw=$(portablectl --no-pager --no-legend list | grep -v " raw " | cut -d ' ' -f1 | tr '\n' ' ')
-    if [ -n "$_nonraw" ]; then
-        dwarn "systemd-portabled: this module only installs raw disk images in the initramfs; skipping: $_nonraw"
-    fi
-
     inst_multiple -o \
-        "/var/lib/portables/*.raw" \
-        "/usr/lib/portables/*.raw" \
         "$tmpfilesdir/portables.conf" \
         "$dbussystem"/org.freedesktop.portable1.conf \
         "$dbussystemservices"/org.freedesktop.portable1.service \
@@ -66,7 +55,6 @@ install() {
     # Install the hosts local user configurations if enabled.
     if [[ $hostonly ]]; then
         inst_multiple -H -o \
-            "/etc/portables/*.raw" \
             "$systemdutilconfdir/system.attached/*" \
             "$systemdutilconfdir/system.attached/*/*" \
             "$systemdutilconfdir/portable/profile/default/*.conf" \