mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
build-root-filesystem: Move "cp -R" block up.
I want to add a "chmod -R" right after the cp command. This needs to happen before all the other chmods, to not undo their effect.
This commit is contained in:
parent
8630ef6df6
commit
309a91847f
1 changed files with 23 additions and 23 deletions
|
@ -23,6 +23,29 @@ fi
|
|||
|
||||
umask 0022
|
||||
|
||||
printf "installing base system... "
|
||||
cp -R "$SERENITY_ROOT"/Base/* mnt/
|
||||
cp -R Root/* mnt/
|
||||
chmod 400 mnt/res/kernel.map
|
||||
|
||||
chmod 660 mnt/etc/WindowServer/WindowServer.ini
|
||||
chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini
|
||||
echo "/bin/sh" > mnt/etc/shells
|
||||
|
||||
chown 0:$wheel_gid mnt/bin/su
|
||||
chown 0:$phys_gid mnt/bin/shutdown
|
||||
chown 0:$phys_gid mnt/bin/reboot
|
||||
chown 0:0 mnt/boot/Kernel
|
||||
chown 0:0 mnt/res/kernel.map
|
||||
chmod 0400 mnt/res/kernel.map
|
||||
chmod 0400 mnt/boot/Kernel
|
||||
chmod 4750 mnt/bin/su
|
||||
chmod 4755 mnt/bin/ping
|
||||
chmod 4750 mnt/bin/reboot
|
||||
chmod 4750 mnt/bin/shutdown
|
||||
|
||||
echo "done"
|
||||
|
||||
printf "creating initial filesystem structure... "
|
||||
for dir in bin etc proc mnt tmp boot mod; do
|
||||
mkdir -p mnt/$dir
|
||||
|
@ -83,29 +106,6 @@ ln -s /proc/self/fd/1 mnt/dev/stdout
|
|||
ln -s /proc/self/fd/2 mnt/dev/stderr
|
||||
echo "done"
|
||||
|
||||
printf "installing base system... "
|
||||
cp -R "$SERENITY_ROOT"/Base/* mnt/
|
||||
cp -R Root/* mnt/
|
||||
chmod 400 mnt/res/kernel.map
|
||||
|
||||
chmod 660 mnt/etc/WindowServer/WindowServer.ini
|
||||
chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini
|
||||
echo "/bin/sh" > mnt/etc/shells
|
||||
|
||||
chown 0:$wheel_gid mnt/bin/su
|
||||
chown 0:$phys_gid mnt/bin/shutdown
|
||||
chown 0:$phys_gid mnt/bin/reboot
|
||||
chown 0:0 mnt/boot/Kernel
|
||||
chown 0:0 mnt/res/kernel.map
|
||||
chmod 0400 mnt/res/kernel.map
|
||||
chmod 0400 mnt/boot/Kernel
|
||||
chmod 4750 mnt/bin/su
|
||||
chmod 4755 mnt/bin/ping
|
||||
chmod 4750 mnt/bin/reboot
|
||||
chmod 4750 mnt/bin/shutdown
|
||||
|
||||
echo "done"
|
||||
|
||||
printf "writing version file... "
|
||||
GIT_HASH=$( (git log --pretty=format:'%h' -n 1 | head -c 7) || true )
|
||||
printf "[Version]\nMajor=1\nMinor=0\nGit=%s\n" "$GIT_HASH" > mnt/res/version.ini
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue