[PC-BSD Commits] r17793 - pcbsd-projects/AD_4_PCBSD/rc

svn at pcbsd.org svn at pcbsd.org
Mon Jul 16 22:03:24 PDT 2012


Author: johnh
Date: 2012-07-17 05:03:24 +0000 (Tue, 17 Jul 2012)
New Revision: 17793

Modified:
   pcbsd-projects/AD_4_PCBSD/rc/rc.AD
Log:
Remove FreeNAS specific code/settings.



Modified: pcbsd-projects/AD_4_PCBSD/rc/rc.AD
===================================================================
--- pcbsd-projects/AD_4_PCBSD/rc/rc.AD	2012-07-17 04:58:17 UTC (rev 17792)
+++ pcbsd-projects/AD_4_PCBSD/rc/rc.AD	2012-07-17 05:03:24 UTC (rev 17793)
@@ -26,87 +26,7 @@
 
 . /etc/rc.subr
 
-
 #
-#	FreeNAS settings	
-#
-: ${FREENAS_CONFIG:="/data/freenas-v1.db"}
-: ${FREENAS_CONFIG_MD5:="/var/tmp/freenas_config.md5"}
-: ${FREENAS_SQLITE_CMD:="/usr/local/bin/sqlite3"}
-: ${FREENAS_RC:="/var/tmp/rc.conf.freenas"}
-
-#
-#	Updater specific variables.
-#
-: ${CD_UPGRADE_SENTINEL="/data/cd-upgrade"}
-: ${NEED_UPDATE_SENTINEL="/data/need-update"}
-
-#
-#	OPENSSL settings
-#
-: ${OPENSSL:="/usr/bin/openssl"}
-: ${SSLDIR:="/etc/ssl/freenas"}
-: ${SSLCONF:="${SSLDIR}/openssl.conf"}
-: ${SSLCADIR:="${SSLDIR}/CA"}
-: ${SSLCACERTDIR:="${SSLCADIR}/certs"}
-: ${SSLCAPRIVDIR:="${SSLCADIR}/private"}
-: ${SSLCACERT:="${SSLCADIR}/cacert.crt"}
-: ${SSLCAKEY:="${SSLCAPRIVDIR}/cakey.key"}
-
-#
-#	HTTPD settings
-#
-: ${HTTPD:="/usr/local/sbin/nginx"}
-: ${HTTPDDIR:="/usr/local/etc/nginx"}
-: ${HTTPDSCRIPT:="/usr/local/etc/rc.d/nginx"}
-: ${HTTPDCONF:="${HTTPDDIR}/nginx.conf"}
-: ${HTTPDSSLDIR:="${SSLDIR}/nginx"}
-: ${HTTPDKEY:="${HTTPDSSLDIR}/nginx.key"}
-: ${HTTPDCERT:="${HTTPDSSLDIR}/nginx.crt"}
-: ${HTTPDSSLPORT:="443"}
-: ${HTTPDPORT:="80"}
-
-#
-#	Misc settings
-#
-: ${FREENAS_CACHEDIR:="/var/tmp/.cache"}
-: ${FREENAS_CACHESIZE:="2g"}
-: ${FREENAS_CACHEEXPIRE:="60"}
-
-#
-#	LDAP settings
-#
-: ${NSS_LDAP_CONF:="/usr/local/etc/nss_ldap.conf"}
-: ${NSS_LDAP_SECRET:="/usr/local/etc/nss_ldap.secret"}
-: ${LDAP_CONF:="/usr/local/etc/openldap/ldap.conf"}
-: ${CERT_FILE:="/usr/local/etc/certs/cacert.crt"}
-: ${LDAP_TIMEOUT:="0"}
-
-#
-#	PAM settings
-#
-: ${PAM_TEMPLATE_DIR:="/etc/ix/templates/pam.d"}
-: ${PAM_DIR:="/etc/pam.d"}
-
-#
-#	NSS settings
-#
-: ${PATH_NS_CONF:="/etc/nsswitch.conf"}
-
-#
-#	Kerberos settings
-#
-: ${PATH_KRB5_TEMPLATE:="/etc/ix/templates/kerberos/krb5.conf"}
-: ${PATH_KRB5_CONFIG:="/etc/krb5.conf"}
-: ${PATH_AD_KEYTAB:="/etc/AD.keytab"}
-
-#
-#	Samba settings
-#
-: ${SMB_CONF:="/usr/local/etc/smb.conf"}
-
-
-#
 #	Active Directory config
 #
 : ${AD_CONF:="/usr/local/etc/AD.conf"}
@@ -449,85 +369,3 @@
 	AD_set gchost "$(echo "${gc}"|cut -f1 -d:)"
 	AD_set gcport "$(echo "${gc}"|cut -f2 -d:)"
 }
-
-# Create a cache filesystem on ${FREENAS_CACHEDIR} .
-#
-# Used by ix-activedirectory and ix-ldap.
-#
-# Returns 0 if successful; 1 if unsuccessful.
-#
-# NOTE: This function is intentionally noisy to catch potential logic errors
-# with the boot process.
-#
-# TODO: add permanent store capability; using the mdconfig* rc.d scripts would
-# be a good idea as it features pre-populating / fsck functionality for memory
-# disk images, whereas mdmfs doesn't.
-# TODO: employ something similar for ix-collectd, but only after the permanent
-# store capability has been added.
-create_cache_filesystem()
-{
-	local dev
-
-	# test to see if /var is an md, if not, presumably it's been moved to
-	# a persistant volume, so skip creating a separate in memory
-	# filesystem for it.
-	mount | awk '$3 == "/var" {print $1}' | grep -qE "/dev/md[[:digit:]]+"
-	if [ $? -ne 0 ] ; then
-		if [ ! -d "${FREENAS_CACHEDIR}" ]; then
-			mkdir -p "${FREENAS_CACHEDIR}"
-		fi
-		return 0
-	fi
-
-	if [ -d "${FREENAS_CACHEDIR}" ]; then
-		dev=$(mount | awk -v "dir=$FREENAS_CACHEDIR" \
-			'$3 == dir { print $1 }')
-		if [ -n "$dev" ] && ! umount $dev; then
-			return 1
-		fi
-	else
-		mkdir -p "${FREENAS_CACHEDIR}"
-	fi
-
-	mdmfs -i 4096 -b 4096 -f 512 -s ${FREENAS_CACHESIZE} \
-	    md "${FREENAS_CACHEDIR}"
-	if [ $? -eq 0 ]; then
-		return 0
-	fi
-
-	return 1
-}
-
-#
-#	General purpose utility functions.
-#
-
-# 'var to SQL Fields'
-#
-# sh vars don't work with ',', but SQL fields require use them as required separators.
-var_to_sf()
-{
-	echo $* | sed -e 's/ /, /g'
-}
-
-# Is a service enabled?
-#
-# Parameters:
-# 1 - service name, e.g. afp, cifs, etc.
-#
-# Returns:
-# 0 - enabled
-# 1 - disabled
-# 2 - not found
-srv_enabled()
-{
-	enabled=$(${FREENAS_SQLITE_CMD} ${FREENAS_CONFIG} \
-	    "SELECT srv_enable from services_services where srv_service = '$1'" \
-	    2>/dev/null)
-	if [ "$enabled" = 1 ]; then
-		return 0
-	elif [ "$enabled" = 0 ]; then
-		return 1
-	fi
-	return 2
-}



More information about the Commits mailing list