aei2dsa
来自「ftam等标准协议服务器和客户端的源代码。」· 代码 · 共 59 行
TXT
59 行
#!/bin/sh# assumptions# 1. we are bound with sufficient access rights (e.g manager)# 2. we are positioned at the right part of the DITsed 's/ */ /gs/ :/:/gs/\&/\\&/g' < quipuentities | awk -F: 'BEGIN { print "#!/bin/sh"}{ if ( substr($0,1,1) == "#" ) next if ( $1 == "" ) next if ( last != $1 ) { last = $1 dn = "\"cn=" $1 "\"" print "if ( showname " dn " 1>/dev/null 2>&1 )\nthen" print "\techo " $1 "..." print "else" print "\techo \"objectClass=applicationProcess & quipuObject\" > /tmp/aet$$" print "\tadd \"cn=" $1 "\" -draft /tmp/aet$$ -noedit" print "fi\n" } print "echo \" " $2 "...\"" dn = "\"cn=" last "@cn=" $2 "\"" print "if ( showentry " dn " -edb -all > /tmp/zaet$$ 2>/dev/null )\nthen" print "\tsed \"s@supportedApplicationContext=.*@supportedApplicationContext= " $3 "@\" </tmp/zaet$$ |\\" print "\tsed \"s@presentationAddress=.*@presentationAddress= " $4 "@\" |\\" print "\tsed \"s@execVector=.*@execVector= " $5 "@\" >/tmp/aet$$ " if ( $5 != "" ) print "\techo \"objectClass=isodeapplicationEntity & quipuObject\" >> /tmp/aet$$" print "\tmodify " dn " -draft /tmp/aet$$ -noedit 2>&1 | sed '\''s/The draft.*/ No Change/\ns/are exactly.*//'\''" print "\trm -f /tmp/zaet$$" print "else" print "\techo \"supportedApplicationContext=" $3 "\" > /tmp/aet$$" print "\techo '\''presentationAddress=" $4 "'\'' >> /tmp/aet$$" if ( $5 == "" ) print "\techo \"objectClass=applicationEntity &quipuObject\" >> /tmp/aet$$" else { print "\techo '\''execVector=" $5 "'\'' >> /tmp/aet$$" print "\techo \"objectClass=isodeapplicationEntity & quipuObject\" >> /tmp/aet$$" } print "\tadd " dn " -draft /tmp/aet$$ -noedit" print "fi\n"}END { print "rm -f /tmp/aet$$"} '
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?