be wrong.
Made the install process quieter when install already done.
rc and daily now is more readonly-/usr aware (for cd).
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
#!/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
# 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
# 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
#
# 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
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
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