diff options
author | Ollivier Robert <roberto@FreeBSD.org> | 2008-08-17 17:37:33 +0000 |
---|---|---|
committer | Ollivier Robert <roberto@FreeBSD.org> | 2008-08-17 17:37:33 +0000 |
commit | cce65f439697627afbccf5a67035a957bb4d784a (patch) | |
tree | 16d100fbc9dae63888d48b464e471ba0e5065193 /scripts/support/etc/setup | |
parent | 8c24a1e0ffd629427f94da1b681600008030c41a (diff) |
Notes
Diffstat (limited to 'scripts/support/etc/setup')
-rw-r--r-- | scripts/support/etc/setup | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/scripts/support/etc/setup b/scripts/support/etc/setup new file mode 100644 index 0000000000000..d4ea75ecfaa93 --- /dev/null +++ b/scripts/support/etc/setup @@ -0,0 +1,72 @@ +# +# setup,v 3.1 1993/07/06 01:10:55 jbj Exp +# +# /bin/sh sourced file for environment setup +# expects NTPROOT variable initialized +# +# if not set it will be initialized to /usr/local/NTP +# +# setup,v +# Revision 3.1 1993/07/06 01:10:55 jbj +# XNTP release 3.1 +# +# +# Revision 1.1 1992/12/10 12:59:25 kardel +# Prerelease NTP V3 / DCF +# +# Revision 1.1 1992/12/10 10:14:46 kardel +# Initial revision +# +# +NTPROOT=${NTPROOT-/usr/local/NTP} + +# +# we so use our own echos, as we somes want to substitute them with a +# file logging version durin the /etc/rc.local phase +# +set `type ECHO` + +PATH="${PATH}:$NTPROOT/bin" +export PATH + +if [ "$2" = "is" ]; then + : +else + # + # find out the way echos work (Rest of rc thinks BSD echo) + # + ECHOREP="`echo -n x`" + if [ "$ECHOREP" = "-n x" ]; then + ECHO () { + if [ "$1" = "-n" ]; then + shift + echo "$@\c" + else + echo "$@" + fi + } + #ECHO "System V style echo" + else + ECHO () { + echo "$@" + } + #ECHO "BSD style echo" + fi + + NLECHO () { + echo "$@" + } + + LOG () { + while read _line; do + ECHO "$_line" + done + } + # + # carefully find out some configuration Variables + # + ARCH="`(arch) 2>/dev/null || ((uname) > /dev/null && uname -a | awk '{ print $6; }') 2>/dev/null || echo 'no-arch'`" + KARCH="`(arch -k) 2>/dev/null || ((uname) > /dev/null && uname -a | awk '{ print $5 }') || echo 'no-arch'`" + HOSTNAME="`(hostname) 2>/dev/null || uname -n`" +fi + |