[Cdd-commits] r1208 - cdd/trunk/blends

CDD Subversion Commit noreply at alioth.debian.org
Wed Nov 5 21:33:34 UTC 2008


Author: tille
Date: Wed Nov  5 21:33:34 2008
New Revision: 1208

Added:
   cdd/trunk/blends/blend-user
      - copied, changed from r1202, cdd/trunk/blends/dis-user
   cdd/trunk/blends/blend-user.8
      - copied, changed from r1202, cdd/trunk/blends/dis-user.8
Removed:
   cdd/trunk/blends/dis-user
   cdd/trunk/blends/dis-user.8
Log:
-> blend-user


Copied: cdd/trunk/blends/blend-user (from r1202, cdd/trunk/blends/dis-user)
==============================================================================
--- cdd/trunk/blends/dis-user	(original)
+++ cdd/trunk/blends/blend-user	Wed Nov  5 21:33:34 2008
@@ -3,21 +3,21 @@
 # $Id$
 
 usage () {
-   echo "Usage:   `basename $0` <action> <DIS> <user> [<Role>]"
+   echo "Usage:   `basename $0` <action> <Blend> <user> [<Role>]"
    echo	"action:  add|del"
-   echo "DIS:     `getDISList|tr ' ' '|'`"
-   echo "user:    user of the system who should be added to the DIS"
-   echo "Role:    a registered Role for specified DIS" 
-   echo "          (default: the one named like DIS)"
+   echo "Blend:   `getBlendList|tr ' ' '|'`"
+   echo "user:    user of the system who should be added to the Blend"
+   echo "Role:    a registered Role for specified Blend" 
+   echo "          (default: the one named like Blend)"
 }
 
 
-# the base dir for DIS conffiles, where script expects to find dirs named like
-# each registered DISs
-CONFBASE=${CONFBASE:-/etc/dis}
+# the base dir for Blend conffiles, where script expects to find dirs named like
+# each registered Blend
+CONFBASE=${CONFBASE:-/etc/blends}
 
-# a local per DIS conf is sourced later, after argoument parsing
-. ${CONFBASE}/dis.conf
+# a local per Blend conf is sourced later, after argoument parsing
+. ${CONFBASE}/blends.conf
 
 
 # Check consistency of passed argouments
@@ -32,7 +32,7 @@
    exit 67 # EX_USAGE
 fi
 if [ -z "$2" ] ; then
-   echo "Missing dis name."
+   echo "Missing blend name."
    echo
    usage
    exit 67 # EX_USAGE
@@ -45,67 +45,33 @@
 fi
 
 ACTION=$1
-DIS=$2
-DISUSER=$3
-ROLE=${4:-${DIS}}
+BLEND=$2
+BLENDUSER=$3
+ROLE=${4:-${BLEND}}
 
-# Now that we know the selected DIS, we can check if there is a local
+# Now that we know the selected Blend, we can check if there is a local
 # configuration for it (ie differnt backend from the default one)
-test -n "${DIS}" -a  -f ${CONFBASE}/${DIS}/${DIS}.conf &&
-	. ${CONFBASE}/${DIS}/${DIS}.conf
+test -n "${BLEND}" -a  -f ${CONFBASE}/${BLEND}/${BLEND}.conf &&
+	. ${CONFBASE}/${BLEND}/${BLEND}.conf
 
 if [ -n "${DBBACKEND}" ]; then
 	set -e
-	checkDIS ${DIS} || disFail $? "Debian Integrated Solution ${DIS} does not exist"
-	checkUser ${DISUSER} || disFail $? "User ${DISUSER} does not exist"
-	checkRole ${ROLE} || disFail $? "Role ${ROLE} does not exist"
-	checkRoleInDIS ${DIS} ${ROLE} || \
-			disFail $? "DIS (${DIS}) and Role (${ROLE}) are not correct or incompatible with the selected backend"
+	checkBlend ${BLEND} || blendFail $? "Debian Pure Blend ${BLEND} does not exist"
+	checkUser ${BLENDUSER} || blendFail $? "User ${BLENDUSER} does not exist"
+	checkRole ${ROLE} || blendFail $? "Role ${ROLE} does not exist"
+	checkRoleInBlend ${BLEND} ${ROLE} || \
+			blendFail $? "Blend (${BLEND}) and Role (${ROLE}) are not correct or incompatible with the selected backend"
 
 	if [ "`toLower ${ACTION}`" = "add" ]; then
-		setUserRole ${DIS} ${DISUSER} ${ROLE} || \
-			disFail $? "Failed to set user ${DISUSER} to role ${ROLE}"
+		setUserRole ${BLEND} ${BLENDUSER} ${ROLE} || \
+			blendFail $? "Failed to set user ${BLENDUSER} to role ${ROLE}"
 	elif [ "`toLower ${ACTION}`" = "del" ]; then
-		unsetUserRole ${DIS} ${DISUSER} ${ROLE} || \
-			disFail $? "Failed to unset user ${DISUSER} to role ${ROLE}"
+		unsetUserRole ${BLEND} ${BLENDUSER} ${ROLE} || \
+			blendFail $? "Failed to unset user ${BLENDUSER} to role ${ROLE}"
 	fi	
 
-#	# MENU installation
-#
-#	# All DIS menu entries will go in .dis-menu, only one file will goes in
-#	# .menu, so it's easy to remove/update
-#	UHOME=`getUserHome ${DISUSER}`
-#	if [ ! -d "${UHOME}" ] ; then
-#	   logFail 67  "Home directory for user ${DISUSER} does not exist.\n... Sorry can not update menus."
-#	fi
-#	
-#	if [ ! -d ${UHOME}/.menu ] ; then
-#	   mkdir -p ${UHOME}/.menu
-#	   chown ${DISUSER}: ${UHOME}/.menu
-#	fi
-#
-#	if [ ! -d ${UHOME}/.dis-menu ] ; then
-#	   mkdir -p ${UHOME}/.dis-menu
-#	   chown ${DISUSER}: ${UHOME}/.dis-menu
-#	fi
-#
-#	MENUS=""	
-#	if [ -d ${CONFBASE}/${DIS} ] ; then
-#	   if [ -d ${CONFBASE}/${DIS}/menu ] ; then
-#	      for MENU in `ls ${CONFBASE}/${DIS}/menu` ; do
-#	         cp -a ${CONFBASE}/${DIS}/menu/${MENU} ${UHOME}/.dis-menu
-#	         chown ${DISUSER}: ${UHOME}/.dis-menu/${MENU}
-#			 MENUS="${MENUS} ${MENU}"
-#	      done
-#	   fi
-#	fi
-#	
-#	for MENU in ${MENUS}; do
-#		echo '!include'" ${UHOME}/.dis-menu/${MENU}"
-#	done > ${UHOME}/.menu/dis-menu
-
 	set +e
 else
 	# EX_USAGE
-	disFail 67 "You choose to not use Roles"
+	blendFail 67 "You choose to not use Roles"
 fi

Copied: cdd/trunk/blends/blend-user.8 (from r1202, cdd/trunk/blends/dis-user.8)
==============================================================================
--- cdd/trunk/blends/dis-user.8	(original)
+++ cdd/trunk/blends/blend-user.8	Wed Nov  5 21:33:34 2008
@@ -1,13 +1,13 @@
-.TH dis-user 8 "2004/03/24" "" "Debian Integrated Solutions"
+.TH blend-user 8 "2008/11/05" "" "Debian Pure Blends"
 .SH NAME
-.B dis-user
-\- add/remove user to Role of a registered Debian Integrated Solution
+.B blend-user
+\- add/remove user to Role of a registered Debian Pure Blend
 
 .SH SYNOPSIS
-.B dis-user
+.B blend-user
 .B add|del
 <
-.B DIS
+.B Blend
 >
 <
 .B user
@@ -20,31 +20,31 @@
 Add user to a
 .B Role
 of the specified
-.B DIS
+.B Blend
 
 If 
 .B Role
 is not specified, it's assumed to be named like 
-.B DIS
+.B Blend
 
 .SH OPTIONS
 .TP
-.B DIS
-- a registered Debian Integrated Solution in /etc/dis, for example one of
-.I med 
+.B Blend
+- a registered Debian Pure Blend in /etc/blends, for example one of
+.I edu
 ,
-.I junior
+.I gis
 ,
-.I desktop
+.I junior
 ,
-.I edu
+.I med
 or
-.I demudi
+.I science
 .TP
 .B user
 - user to add
 .B Role
-- the role in the DIS that user will assume
+- the role in the Blend that user will assume
 
 .SH AUTHOR
 Andreas Tille <tille at debian.org>



More information about the Cdd-commits mailing list