Petite mise jour tools
Pseudo-rparation des scripts dans /usr/scripts/gestion/tools/ darcs-hash:20071211003807-ddb99-4670b17b63d914f1c06f84612aecdb3b9bb909f0.gz
This commit is contained in:
parent
3e269dbbfc
commit
a1a9308602
5 changed files with 9 additions and 9 deletions
|
@ -9,14 +9,14 @@ from ldap_crans import crans_ldap, decode
|
|||
db = crans_ldap()
|
||||
txts = []
|
||||
|
||||
for droit in [ u'Nounou', u'Apprenti', u'Modérateur', u'Câbleur', u'Déconnecteur',u'CVSWeb' , u'WebRadio' , u'Imprimeur'] :
|
||||
for droit in [ u'Nounou', u'Apprenti', u'Moderateur', u'Cableur', u'WebRadio' , u'Imprimeur', u'Bureau', u'Tresorier'] :
|
||||
adhs = db.search('droits=%s' % droit)['adherent']
|
||||
|
||||
noms = []
|
||||
|
||||
txt = '%s\n' % droit
|
||||
for adh in adhs :
|
||||
noms.append(u'%s' % adh.Nom().encode('iso-8859-1'))
|
||||
noms.append(u'%s' % adh.Nom())
|
||||
|
||||
txt += u' %s' % '\n '.join(noms)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import sys
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
|
||||
from ldap_crans import crans_ldap, decode, crans
|
||||
from ldap_crans import crans_ldap, decode
|
||||
|
||||
db = crans_ldap()
|
||||
machines = db.search('exempt=*')['machine']
|
||||
|
@ -15,7 +15,7 @@ for m in machines :
|
|||
|
||||
# texte pour la machine
|
||||
txt = u''
|
||||
txt += u'Propriétaire : %s\n' % m.proprietaire().Nom().encode('iso-8859-1')
|
||||
txt += u'Propriétaire : %s\n' % m.proprietaire().Nom()
|
||||
txt += u'Machine : %s\n' % m.nom()
|
||||
txt += u'destination : %s\n' % ', '.join(m.exempt())
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ for m in machines :
|
|||
|
||||
# texte pour la machine
|
||||
txt = u''
|
||||
txt += u'Propriétaire : %s\n' % m.proprietaire().Nom().encode('iso-8859-1')
|
||||
txt += u'Propriétaire : %s\n' % m.proprietaire().Nom()
|
||||
txt += u'Machine : %s\n' % m.nom()
|
||||
if m.portTCPin() :
|
||||
txt += u'ports TCP in : %s\n' % ' '.join(m.portTCPin())
|
||||
|
|
|
@ -17,6 +17,6 @@ for c in comptes :
|
|||
continue
|
||||
quota = getoutput('quota %s | grep "/dev/" | awk \'{ print $1" "$3" "$4 }\'' % c.compte())
|
||||
if quota != '/dev/sda1 400000 600000\n/dev/sda2 102400 153600' and quota != '/dev/sda2 102400 153600\n/dev/sda1 400000 600000' :
|
||||
txts.append( '%s (%s)\n%s' % (c.Nom(), c.compte(), quota) )
|
||||
txts.append(u'%s (%s)\n%s' % (c.Nom(), c.compte(), quota))
|
||||
|
||||
print '\n- - - - - - = = = = = = # # # # # # # # = = = = = = - - - - - -\n'.join(txts).encode('iso-8859-1')
|
||||
print '\n- - - - - - = = = = = = # # # # # # # # = = = = = = - - - - - -\n'.join(txts)
|
||||
|
|
|
@ -17,7 +17,7 @@ for a in adherents :
|
|||
|
||||
# texte pour l'adhérent
|
||||
txt = u''
|
||||
txt += u'Nom : %s\n' % a.Nom().encode('iso-8859-1')
|
||||
txt += u'Nom : %s\n' % a.Nom()
|
||||
txt += u'Solde : %s\n' % a.solde()
|
||||
|
||||
txts.append(txt.strip())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue