From a303ac5c646d07e5b9b51210ca9fbfe93704ade0 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 27 Dec 2004 21:35:56 +0000 Subject: [PATCH] Added support for OpenBSD --- SETUP.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/SETUP.sh b/SETUP.sh index 8a572bb4..fd406ff4 100644 --- a/SETUP.sh +++ b/SETUP.sh @@ -47,13 +47,13 @@ log "+" "Current directory is `pwd`" # Check the OS type, only Linux for now. # -if [ "$OSTYPE" != "Linux" ] && [ "$OSTYPE" != "FreeBSD" ] && [ "$OSTYPE" != "NetBSD" ] && [ "$OSTYPE" != "Darwin" ]; then +if [ "$OSTYPE" != "Linux" ] && [ "$OSTYPE" != "FreeBSD" ] && [ "$OSTYPE" != "NetBSD" ] && [ "$OSTYPE" != "OpenBSD" ] && [ "$OSTYPE" != "Darwin" ]; then cat << EOF Your are trying to install MBSE BBS on a $OSTYPE system, however -at this time only Linux, FreeBSD, NetBSD and Darwin (OS X) is supported. - +at this time only Linux, FreeBSD, NetBSD, OpenBSD and Darwin (OS X) +are supported. EOF log "!" "Aborted, OS is $OSTYPE" @@ -116,6 +116,10 @@ if [ "$OSTYPE" = "NetBSD" ]; then DISTNAME="NetBSD" DISTVERS=`uname -r` fi +if [ "$OSTYPE" = "OpenBSD" ]; then + DISTNAME="OpenBSD" + DISTVERS=`uname -r` +fi if [ "$OSTYPE" = "Darwin" ]; then DISTNAME="Darwin" DISTVERS=`uname -r` @@ -177,9 +181,9 @@ if [ "$OSTYPE" = "Linux" ]; then fi fi -if [ "$OSTYPE" = "FreeBSD" ] || [ "$OSTYPE" = "NetBSD" ] || [ "$OSTYPE" = "Darwin" ]; then +if [ "$OSTYPE" = "FreeBSD" ] || [ "$OSTYPE" = "NetBSD" ] || [ "$OSTYPE" = "OpenBSD" ] || [ "$OSTYPE" = "Darwin" ]; then # - # FreeBSD/NetBSD/Darwin uses /usr/local for extra packages + # FreeBSD/NetBSD/OpenBSD/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 @@ -257,6 +261,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" = "OpenBSD" ]; then + useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G wheel,dialer -m -s /usr/local/bin/bash mbse +fi if [ "$OSTYPE" = "Darwin" ]; then useradd mbse -c "MBSE BBS Admin" -d $MHOME -g bbs -s /bin/bash fi @@ -314,6 +321,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" = "OpenBSD" ]; 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" @@ -376,7 +387,7 @@ if [ "$OSTYPE" = "Linux" ]; then fi rm /etc/passwd.lock fi -if [ "$OSTYPE" = "NetBSD" ] || [ "$OSTYPE" = "Darwin" ]; then +if [ "$OSTYPE" = "NetBSD" ] || [ "$OSTYPE" = "OpenBSD" ] || [ "$OSTYPE" = "Darwin" ]; then cat << EOF READ THIS CAREFULLY NOW READ THIS CAREFULLY NOW @@ -559,7 +570,7 @@ cat << EOF Then issue (as root of course) the following commands: EOF -if [ "$OSTYPE" = "Linux" ] || [ "$OSTYPE" = "NetBSD" ]; then +if [ "$OSTYPE" = "Linux" ] || [ "$OSTYPE" = "NetBSD" ] || [ "$OSTYPE" = "OpenBSD" ]; then echo " userdel bbs" echo " userdel -r mbse" echo " groupdel bbs"