Bug#633582: [PATCH] mkinitramfs: fix bashism in script
Closes: #633582
Signed-off-by: Boris Egorov <egorov@linux.com>
---
mkinitramfs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkinitramfs b/mkinitramfs
index 5baa955..4552046 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -343,7 +343,7 @@ fi
(
# preserve permissions if root builds the image, see #633582
-[ "$UID" != 0 ] && cpio_owner_root="-R 0:0"
+[ "$(id -ru)" != 0 ] && cpio_owner_root="-R 0:0"
# work around lack of "set -o pipefail" for the following pipe:
# cd "${DESTDIR}" && find . | cpio --quiet $cpio_owner_root -o -H newc | gzip >>"${outfile}" || exit 1
--
2.1.3
Reply to: