systemd-initrd: Fix up root directory mode
This commit is contained in:
parent
fef26d88e2
commit
762b69f2ff
|
@ -445,7 +445,8 @@ let
|
||||||
) config.boot.initrd.secrets)
|
) config.boot.initrd.secrets)
|
||||||
}
|
}
|
||||||
|
|
||||||
(cd "$tmp" && find . -print0 | sort -z | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @-) | \
|
# mindepth 1 so that we don't change the mode of /
|
||||||
|
(cd "$tmp" && find . -mindepth 1 -print0 | sort -z | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @-) | \
|
||||||
${compressorExe} ${lib.escapeShellArgs initialRamdisk.compressorArgs} >> "$1"
|
${compressorExe} ${lib.escapeShellArgs initialRamdisk.compressorArgs} >> "$1"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -78,14 +78,14 @@ in
|
||||||
|
|
||||||
STRIP = if strip then "${pkgsBuildHost.binutils.targetPrefix}strip" else null;
|
STRIP = if strip then "${pkgsBuildHost.binutils.targetPrefix}strip" else null;
|
||||||
}) ''
|
}) ''
|
||||||
mkdir ./root
|
mkdir -p ./root/var/empty
|
||||||
make-initrd-ng "$contentsPath" ./root
|
make-initrd-ng "$contentsPath" ./root
|
||||||
mkdir "$out"
|
mkdir "$out"
|
||||||
(cd root && find * .[^.*] -exec touch -h -d '@1' '{}' +)
|
(cd root && find * .[^.*] -exec touch -h -d '@1' '{}' +)
|
||||||
for PREP in $prepend; do
|
for PREP in $prepend; do
|
||||||
cat $PREP >> $out/initrd
|
cat $PREP >> $out/initrd
|
||||||
done
|
done
|
||||||
(cd root && find * .[^.*] -print0 | sort -z | cpio -o -H newc -R +0:+0 --reproducible --null | eval -- $compress >> "$out/initrd")
|
(cd root && find . -print0 | sort -z | cpio -o -H newc -R +0:+0 --reproducible --null | eval -- $compress >> "$out/initrd")
|
||||||
|
|
||||||
if [ -n "$makeUInitrd" ]; then
|
if [ -n "$makeUInitrd" ]; then
|
||||||
mkimage -A "$uInitrdArch" -O linux -T ramdisk -C "$uInitrdCompression" -d "$out/initrd" $out/initrd.img
|
mkimage -A "$uInitrdArch" -O linux -T ramdisk -C "$uInitrdCompression" -d "$out/initrd" $out/initrd.img
|
||||||
|
|
Loading…
Reference in a new issue