2 # Ownerships and permissions
4 chown root:games usr/games usr/share/games usr/local/games var/games
6 chown root:mail var/mail
7 chown root:lp var/spool/lpd
8 chown root:news var/spool/news
14 # Force symlink creation for "/var/run -> /run" and "/var/lock -> /run/lock"
24 chmod 1777 tmp run/lock
25 chmod 775 usr/games usr/share/games usr/local/games var/games
27 # Create character special files, if needed
28 test -c dev/console || mknod -m 600 dev/console c 5 1
29 test -c dev/null || mknod -m 666 dev/null c 1 3
31 # Create shm directory if does not exist
32 test -e dev/shm || mkdir -p dev/shm
34 # Create file records for logins and logouts
36 var/log/btmp var/log/lastlog var/log/faillog var/log/wtmp var/run/utmp
38 chgrp utmp var/log/lastlog var/run/utmp
39 chmod 664 var/log/lastlog var/run/utmp
40 chmod 600 var/log/btmp
42 # Make symlinks at 'rootdir'
44 for link_name in bin sbin
46 if test ! -L $link_name
49 ln -s -f usr/${link_name} $link_name
61 ln -sf share/info info
65 cd usr/local || exit 1
67 ln -sf share/info info
71 cd var/spool || exit 1
75 # Offer a compatible "X11R6 symlink"
76 test -L usr/X11R6 || ( cd usr && ln -sf . X11R6 )
80 if test "$libSuffix" != X
82 rmdir lib usr/lib usr/local/lib 2> /dev/null
84 # Make default library path using 'libSuffix', linking
85 # canonical path "lib" to the library suffix directory
86 for directory in usr usr/local
89 cd "$directory" || exit 1
90 test -d lib${libSuffix} || mkdir -p lib${libSuffix}
94 ln -s -f lib${libSuffix} lib
99 # This is for the 'rootdir'
102 if test ! -L lib${libSuffix}
104 rm -f lib${libSuffix}
105 ln -s -f usr/lib${libSuffix} lib${libSuffix}
110 ln -s -f lib${libSuffix} lib
114 # Make canonical paths for usr/lib, usr/local/lib, with a
115 # symlink of "/lib -> usr/lib" if 'libSuffix' is empty
116 for directory in usr/lib usr/local/lib
118 test -e $directory || mkdir -p $directory
121 if test ! -L lib || test ! -e lib
128 # Re-create pkgconfig directory
129 test -e usr/lib/pkgconfig || mkdir -p usr/lib/pkgconfig
130 test -e usr/local/lib/pkgconfig || mkdir -p usr/local/lib/pkgconfig
132 for directory in usr/share usr/local/share
134 ( cd $directory && ln -sf ../lib/pkgconfig . )