Fixed an mtree bugs that caused permissions and ownerships for / to
be wrong. Made the install process quieter when install already done. rc and daily now is more readonly-/usr aware (for cd).
This commit is contained in:
parent
6b500b03a6
commit
9748a6536e
5 changed files with 23 additions and 11 deletions
14
etc/Makefile
14
etc/Makefile
|
@ -12,10 +12,12 @@ clean::
|
|||
install::
|
||||
@echo "Installing /etc and /usr/etc.."
|
||||
mkdir -p $(ETC)
|
||||
for f in $(FILES1); do if [ -f $(ETC)/$$f ]; then echo $$f exists; else cp $$f $(ETC); chmod 755 $(ETC)/$$f; fi; done
|
||||
for f in $(FILES2); do if [ -f $(ETC)/$$f ]; then echo $$f exists; else cp $$f $(ETC); chmod 600 $(ETC)/$$f; fi; done
|
||||
@for f in $(FILES1); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 755 $(ETC)/$$f; fi; done
|
||||
@for f in $(FILES2); do if [ -f $(ETC)/$$f ]; then :; else cp $$f $(ETC)/$$f; chmod 600 $(ETC)/$$f; fi; done
|
||||
@echo "Making hierarchy.."
|
||||
./mtree.sh mtree/minix.tree
|
||||
for f in $(FILES3); do if [ -f $(USRETC)/$$f ]; then echo $$f exists; else cp usr/$$f $(USRETC); chmod 755 $(USRETC)/$$f; fi; done
|
||||
cd /dev && /usr/src/commands/scripts/MAKEDEV.sh std
|
||||
(cd ast && tar cf - .* ) | (cd /usr/ast && tar xf - )
|
||||
sh mtree.sh mtree/minix.tree
|
||||
@for f in $(FILES3); do if [ -f $(USRETC)/$$f ]; then :; else cp usr/$$f $(USRETC); chmod 755 $(USRETC)/$$f; fi; done
|
||||
@echo "Making devices.."
|
||||
cd /dev && sh /usr/src/commands/scripts/MAKEDEV.sh std 2>/dev/null
|
||||
@echo "Making user homedirs.."
|
||||
for u in bin ast; do (cd ast && tar cf - .[a-z]* ) | (cd ~$u && tar xf - ); done
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
cat $1 | while read line
|
||||
do awk '{ print "mkdir -p "$4" || exit 1; chmod "$1" "$4" || exit 1; chown "$2" "$4" || exit 1; chgrp "$3" "$4" || exit 1" }' | sh || exit 1
|
||||
do echo $line | awk '{ print "mkdir -p "$4" || exit 1; chmod "$1" "$4" || exit 1; chown "$2" "$4" || exit 1; chgrp "$3" "$4" || exit 1" }' | sh || exit 1
|
||||
done
|
||||
|
|
4
etc/rc
4
etc/rc
|
@ -52,7 +52,6 @@ start)
|
|||
|
||||
# Are we booting from CD?
|
||||
bootcd="`/bin/sysenv bootcd`"
|
||||
ramname="`/bin/sysenv ramname`"
|
||||
|
||||
# If booting from CD, /usr has to be mounted readonly.
|
||||
# Also, $usr won't be specified correctly in the
|
||||
|
@ -60,8 +59,9 @@ start)
|
|||
# where it is.
|
||||
if [ "$bootcd" = 1 ]
|
||||
then
|
||||
ramname="`/bin/sysenv ramimagedev_n`"
|
||||
usr_roflag="-r"
|
||||
usr="/dev/${ramname}p2"
|
||||
usr="/dev/c0`echo $ramname | sed 's/.*\(d.\).*/\1/'`p2"
|
||||
echo "Setting /usr to mount readonly from cd: $ramname -> $usr"
|
||||
fi
|
||||
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
#
|
||||
# daily - daily cleanup of the system.
|
||||
|
||||
# Doesn't make sense when running from CD
|
||||
if [ -f /CD ]
|
||||
then exit
|
||||
fi
|
||||
|
||||
case "$#:$1" in
|
||||
1:cron|1:boot)
|
||||
caller=$1
|
||||
|
@ -20,7 +25,7 @@ then
|
|||
set -- `ls -lT $timestamp`
|
||||
test "$6 $7 $9" = "$(date '+%b %d %Y')" && exit
|
||||
fi
|
||||
>$timestamp 2>/dev/null # Makes for errors when booting from CD
|
||||
>$timestamp
|
||||
|
||||
# Remove three day old files from various tmp dirs.
|
||||
cleantmp -3 /tmp /usr/tmp /usr/preserve /usr/spool/lpd /usr/spool/at/past
|
||||
|
|
|
@ -45,7 +45,12 @@ start)
|
|||
|
||||
echo -n "Starting daemons:"
|
||||
daemonize update
|
||||
daemonize cron
|
||||
|
||||
# Ugly error message when starting cron from CD.
|
||||
# (and cron unnecessary then so..)
|
||||
if [ ! -f /CD ]
|
||||
then daemonize cron
|
||||
fi
|
||||
|
||||
if [ "$net" ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue