diff options
-rwxr-xr-x | adelie-build-txz | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/adelie-build-txz b/adelie-build-txz index 71b2d1b..a41ddf2 100755 --- a/adelie-build-txz +++ b/adelie-build-txz @@ -133,15 +133,28 @@ install_pkgs() { readonly ARCH_PKGS="$(cat packages/arch/$ARCH 2>/dev/null | tr '\n' ' ' || echo '')" fi - mkdir -p rootfs-$ARCH/etc/apk + ( + umask 022 + mkdir -p rootfs-$ARCH/etc/apk + ) cp -r /etc/apk/keys rootfs-$ARCH/etc/apk/ + # Disable grub trigger. mkdir -p rootfs-$ARCH/etc/default printf "ADELIE_MANUAL_CONFIG=1\n" >> rootfs-$ARCH/etc/default/grub + mkdir -p rootfs-$ARCH/dev mknod rootfs-$ARCH/dev/urandom c 1 9 - mkdir -p rootfs-$ARCH/usr/sbin - mkdir -p rootfs-$ARCH/root + + ( + umask 022 + mkdir -p rootfs-$ARCH/usr/sbin + ) + + ( + umask 077 + mkdir -p rootfs-$ARCH/root + ) cp -r bin rootfs-$ARCH/root/bin apk --arch $ARCH \ ${CACHE:+--cache-dir "${CACHE}"} \ |