Possibly this little script helps other people was well .....
regards to all members
TAB

# This script generate -num of applications named in -app and link this to the ldap user named in -dn # This allows to insert many applications to the webtop of the user, to see the performance
# of the Directory Service Integration and other stuff.
# Enhancing / improving to do more will be possible based on this script.
# To run this script, have an activetcl from www.activestate.com installed in /usr/local/ActiveTcl or /opt/ActiveTcl

createApp.tcl -dn uid=tillmann,ou=poeple,dc=tbsol,dc=de -app TESTNAME -num 1000 -file /tmp/ttaobjects -run


--

*ToolBox Solution GmbH*

CEO/CTO Tillmann A. Basien



Balinger Straße 37A

D-70567 Stuttgart



Fon: +49 (0) 711 71 68 631

Hy : +49 (0) 173 87 38 987

Fax: +49 (0) 711 45 70 899

*** Sun Microsystems OEM Partner ***



mailto:[EMAIL PROTECTED] / http://www.tbsol.de  <http://www.tbsol.de>HRB: 23711





This message and any files or documents attached are strictly confidential or otherwise legally protected. It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.

#!/bin/sh
#  Copyright (C) ToolBox Solution GmbH, www.tbsol.de
#  This software code contains proprietary information 
#  and should be treated as confidential.
#
#########################################################
# the next line restarts using tclsh \
PATH=/usr/local/ActiveTcl/bin:/opt/ActiveTcl/bin:$PATH
# \
args=$@
# \
exec tclsh $0 $args


set prg [lindex $argv0 0]
set sourcePath [file dirname $prg]
set prgName [file tail $prg]
if {![regexp {^/} $sourcePath ] } { set sourcePath [pwd]/$sourcePath }
if ![file exists  $sourcePath/etc] { set sourcePath [file normalize 
$sourcePath/..] }
set sourcePath [file normalize $sourcePath]

package require Tclx
package require cmdline

# This script generate -num of applications named -app and link this
# to the ldap user named in -dn
# This allows to insert many Applications to the webtop of the user, to see the 
performance
# of the Directory Service Integration and other suff.
# Enhancing / improving to do more will be possible based on this script.
# To run this script, have an activetcl from www.activestate.com installed on 
/usr/local/ActiveTcl or /opt/ActiveTcl

set dnDefault "uid=testuser,ou=people,dc=ssgd,dc=ch"
set appDefault "TestAPPL"
set baseDefault    "o=organization/ou=test"
set numDefault 10


set options {
             { v "verbose"}
             { dn.arg   $dnDefault "Distigous name of the user"}
             { app.arg  $appDefault "Name of Application" }
             { base.arg $baseDefault "Datastore Base entries" }
             { num.arg  $numDefault "Nummer of applications build into the 
Datasore" }
             { file.arg "-" "File to store the create Script - is stdout" }
             { run      "Run the generated Script (only with file option)" }
            }

# Check Kommandeline
set cmdOptionOk 1
if [catch { array set cmdOption [::cmdline::getoptions argv [subst $options]]  
} cmdMsg ] { set cmdOptionOk 0 }
if {!$cmdOptionOk } { puts stderr "Usage:$cmdMsg" ; exit -1 }

parray cmdOption



# Remove Base in  Tarantella
lappend lines "delete --name $cmdOption(base) --children"
# Create  Base in  Tarantella
lappend lines "new_orgunit --name $cmdOption(base)"

# Insert Applications
set baseApplication $cmdOption(base)/cn=$cmdOption(app)

loop i 0 $cmdOption(num) {
        regsub -all " " [format "%5.5d" $i] 0 name
        lappend lines "new_xapp --name $baseApplication-$name --width 800  
--height 600 --ldapusers $cmdOption(dn)"

}

set inFile 0
if {$cmdOption(file) != "-" } {set inFile 1;  set fp [open $cmdOption(file) w] }
foreach line $lines {
        if $inFile { 
                puts $fp $line
                if $cmdOption(v) { puts $line}
        } else {
                puts $line
        }
        
}
if $inFile { close $fp }

set cmd  "/opt/tarantella/bin/tarantella object script < $cmdOption(file)"

if {$inFile  } { puts "Run: $cmd " }
if {$inFile && $cmdOption(run) } { eval exec $cmd } 
_______________________________________________
SGD-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sgd-users

Reply via email to