From 8e2fa2f4c47b4cd5508be10dfee22e70cf3c1e6b Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 22 Feb 2004 12:51:42 +0000 Subject: [PATCH] Changes for Darwin OS X --- ChangeLog | 7 +++++++ SETUP.sh | 47 ++++++++++++++++++++++++++++------------------- TODO | 7 +++++++ 3 files changed, 42 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81484e33..fd7f7dfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,13 @@ $Id$ v0.51.1 21-Feb-2004 + SETUP.sh: + Changed to support Darwin (OS X). Note that in earlier days + mbse did compile under OS X, but things are different since + then. Work is underway to let it compile and run again. + + + v0.51.0 09-Feb-2004 - 21-Feb-2004 general: diff --git a/SETUP.sh b/SETUP.sh index 53a7c764..2101db49 100644 --- a/SETUP.sh +++ b/SETUP.sh @@ -47,12 +47,12 @@ log "+" "Current directory is `pwd`" # Check the OS type, only Linux for now. # -if [ "$OSTYPE" != "Linux" ] && [ "$OSTYPE" != "FreeBSD" ] && [ "$OSTYPE" != "NetBSD" ]; then +if [ "$OSTYPE" != "Linux" ] && [ "$OSTYPE" != "FreeBSD" ] && [ "$OSTYPE" != "NetBSD" ] && [ "$OSTYPE" != "Darwin" ]; then cat << EOF Your are trying to install MBSE BBS on a $OSTYPE system, however -at this time only Linux, FreeBSD or NetBSD is supported. +at this time only Linux, FreeBSD, NetBSD and Darwin (OS X) is supported. EOF @@ -95,18 +95,12 @@ if [ "$OSTYPE" = "Linux" ]; then DISTVERS=`cat /etc/redhat-release | awk '{ print $13 }' | tr -d \)` fi else - if [ -f /etc/rc.d/rc.0 ] && [ -f /etc/rc.d/rc.local ]; then - # If Slackware wasn't detected yet it is version 4.0 or older. - DISTNAME="Slackware" - DISTVERS="Old" - else - if [ -f /etc/gentoo-release ]; then - DISTNAME="Gentoo" - DISTVERS=`cat /etc/gentoo-release | awk '{ print $5 }'` - else - DISTNAME="Unknown" - fi - fi + if [ -f /etc/gentoo-release ]; then + DISTNAME="Gentoo" + DISTVERS=`cat /etc/gentoo-release | awk '{ print $5 }'` + else + DISTNAME="Unknown" + fi fi fi fi @@ -122,7 +116,10 @@ if [ "$OSTYPE" = "NetBSD" ]; then DISTNAME="NetBSD" DISTVERS=`uname -r` fi - +if [ "$OSTYPE" = "Darwin" ]; then + DISTNAME="Darwin" + DISTVERS=`uname -r` +fi log "+" "Detected \"${OSTYPE}\" (${HOSTTYPE}) \"${DISTNAME}\" version \"${DISTVERS}\"" @@ -180,9 +177,10 @@ if [ "$OSTYPE" = "Linux" ]; then fi fi -if [ "$OSTYPE" = "FreeBSD" ] || [ "$OSTYPE" = "NetBSD" ]; then +if [ "$OSTYPE" = "FreeBSD" ] || [ "$OSTYPE" = "NetBSD" ] || [ "$OSTYPE" = "Darwin" ]; then # - # FreeBSD/NetBSD uses /usr/local for extra packages and doesn't use /opt + # FreeBSD/NetBSD/Darwin uses /usr/local for extra packages + # and doesn't use /opt. # Also using /opt means that we are in the root partition which # by default is very small. We put everything in /usr/local/opt # and create symlinks to it. @@ -223,6 +221,10 @@ cat << EOF your system. It might also be wise to login as root on another virtual console incase something goes wrong with system login. + Darwin (OS X) Users must install the .dmg image of user utils + available on Version Tracker and within this archive prior + to continuing the installation. + If you are not sure, or forgot something, hit Control-C now or EOF @@ -251,6 +253,9 @@ fi if [ "$OSTYPE" = "NetBSD" ]; then useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G wheel,dialer -m -s /usr/pkg/bin/bash mbse fi +if [ "$OSTYPE" = "Darwin" ]; then + useradd mbse -c "MBSE BBS Admin" -d $MHOME -g bbs -s /bin/bash +fi log "+" "[$?] Added user mbse" chmod 775 $MHOME log "+" "[$?] chmod 775 $MHOME" @@ -305,6 +310,10 @@ if [ "$OSTYPE" = "NetBSD" ]; then useradd -c "MBSE BBS Login" -d $MHOME/home/bbs -m -g bbs -s $MHOME/bin/mbnewusr bbs log "+" "[$?] Added user bbs" fi +if [ "$OSTYPE" = "Darwin" ]; then + useradd bbs -c "MBSE BBS Login" -d $MHOME/home/bbs -g bbs -s $MHOME/bin/mbnewuser + log "+" "[$?] Added user bbs" +fi # Some systems (RedHat and Mandrake) insist on creating a users homedir. # NetBSD gives errormessages when not creating a homedir, so we let it create. # These are full of garbage we don't need. Kill it first. @@ -363,13 +372,13 @@ if [ "$OSTYPE" = "Linux" ]; then fi rm /etc/passwd.lock fi -if [ "$OSTYPE" = "NetBSD" ]; then +if [ "$OSTYPE" = "NetBSD" ] || [ "$OSTYPE" = "Darwin" ]; then cat << EOF READ THIS CAREFULLY NOW READ THIS CAREFULLY NOW I don't know how to automatic remove the password for the "bbs" -user account in NetBSD. You have to do this for me! +user account in NetBSD/Darwin. You have to do this for me! Next I start the editor you need to use, remove all the stars" after the word Password, then save the file with "wq!" diff --git a/TODO b/TODO index b3b35bd8..977c35d1 100644 --- a/TODO +++ b/TODO @@ -68,6 +68,13 @@ newuser: L: Allow handles to be the same as the unixname. +mbtask: + N: Add a thread that keeps track of disk usage of all partitions used + by mbse, update partition list after setup changes. Make the info + available for all other programs so they know very fast if enough + space is still available. + + mbfido: N: The elist rules files are named (8.3) areaname.rul where areaname is the first 8 characters of the area name and we use the full name