Liste des shells valides.
Petit message pour prciser que la modif n'est pas prise en compte de suite. darcs-hash:20040910202148-41617-e763d88efa701eb89e8bb5746a57f2a3aa47fe32.gz
This commit is contained in:
parent
e0da11ea79
commit
cd2535f3c8
1 changed files with 9 additions and 4 deletions
|
@ -26,10 +26,15 @@ if len(adh) != 1 :
|
||||||
adh = adh[0]
|
adh = adh[0]
|
||||||
shell = prompt('Nouveau shell :')
|
shell = prompt('Nouveau shell :')
|
||||||
fd=open('/etc/shells')
|
fd=open('/etc/shells')
|
||||||
if not shell in map(str.strip,fd.readlines()) :
|
lines=fd.readlines()
|
||||||
print map(str.strip,fd.readlines())
|
fd.close()
|
||||||
print 'Shell invalide'
|
|
||||||
|
if not shell in map(str.strip,lines) :
|
||||||
|
print 'Shell invalide. Les shells valides sont :'
|
||||||
|
print ''.join(lines[1:])
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
|
||||||
adh.chsh(shell)
|
adh.chsh(shell)
|
||||||
adh.save()
|
adh.save()
|
||||||
|
# A cause de nscd
|
||||||
|
print "La modification sera prise en compte dans l'heure suivante."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue