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"