summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2023-01-30 13:50:28 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-08 18:19:48 +0000
commita9f7267cbd8e6e203520a9d43adfffb41189ce70 (patch)
tree1cd132e427dc7c976e7c60420f0cea81e5e3ff63 /Meta
parentcf5b02e3a47052bd8433c861573f9497521a0420 (diff)
downloadserenity-a9f7267cbd8e6e203520a9d43adfffb41189ce70.zip
Meta: Allow creating disk image without installing kernel into it
This change allows for creating smaller disk images, which is useful for creating a disk image that will be put into ram.
Diffstat (limited to 'Meta')
-rwxr-xr-xMeta/build-root-filesystem.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh
index f986475c0b..b152c12071 100755
--- a/Meta/build-root-filesystem.sh
+++ b/Meta/build-root-filesystem.sh
@@ -117,9 +117,18 @@ if [ -f mnt/usr/Tests/Kernel/TestProcFSWrite ]; then
chmod 4755 mnt/usr/Tests/Kernel/TestProcFSWrite
fi
-chmod 0400 mnt/res/kernel.map
-chmod 0400 mnt/boot/Kernel
-chmod 0400 mnt/boot/Kernel.debug
+if [ -f mnt/res/kernel.map ]; then
+ chmod 0400 mnt/res/kernel.map
+fi
+
+if [ -f mnt/boot/Kernel ]; then
+ chmod 0400 mnt/boot/Kernel
+fi
+
+if [ -f mnt/boot/Kernel.debug ]; then
+ chmod 0400 mnt/boot/Kernel.debug
+fi
+
chmod 600 mnt/etc/shadow
chmod 755 mnt/res/devel/templates/*.postcreate
echo "done"