@@ -10,20 +10,10 @@ chmod 0760 "$TARGET/init"
1010mkdir -p " $TARGET /usr/src"
1111git rev-parse HEAD > " $TARGET /usr/src/niceOS.hash"
1212
13- # Replace some /bin programs
13+ # Provide some /bin programs
1414pushd " $TARGET /bin/"
15- # Overwrite some core utils
16- ln -s busybox clear & > /dev/null || true # everybody likes clear
17- ln -sf busybox login # bypass logind
15+ ln -s busybox clear & > /dev/null || true # everybody wants clear
1816 ln -sf busybox hostname # override net-tools version or /proc/sys/kernel/hostname symlink for more universal solution
19-
20- [ -x mcedit ] && { # mcedit if no vi
21- ln -s mcedit vi 2> /dev/null || true
22- }
23- [ -f bash ] && { # bash pls
24- ln -sf bash sh
25- }
26- rm -f init # we have own init
2717popd
2818
2919
@@ -32,15 +22,7 @@ chmod -R o+rX,o-w "$TARGET/etc/"
3222chmod -R o-r " $TARGET /etc/ssh/" 2> /dev/null || true
3323chmod -R o+rX " $TARGET /usr/share/" 2> /dev/null || true
3424chmod -R o-rwx " $TARGET /root/"
35-
36-
37- # Add other read permission for text executable files inside bin
38- chmod -R o-r " $TARGET /usr/bin/" 2> /dev/null || true
39- for bin in $( find " $TARGET /usr/bin/" -type f -exec file {} \; | grep ' text executable' | grep -E -i -o -e " $TARGET /usr/bin/[-a-z0-9._+]+: " | sed ' s/: //' ) ; do
40- chmod o+r " $bin "
41- done
4225chmod o+rx " $TARGET /usr/bin/busybox"
43- [ -f " $TARGET /bin/su" ] && [ ! -L " $TARGET /bin/su" ] && chmod u+s " $TARGET /bin/su" || true
4426
4527
4628# Replace some $TARGET/usr files with our own build support
0 commit comments