(List (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub 1]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Usage: "][VarSub 0][LIT_CHARS " add|remove (hostname)"]]}) (Com {[LIT_CHARS exit]}) ) ) (If (DBracket {B! {B1 UNARY_STRING_z {[DQ [VarSub 2]]}}}) (= scope= flags=0 words=[] bindings=[('EXACTHOST', {[VarSub 2]})]) ) (= scope= flags=0 words=[] bindings=[('TRANSCRIPT', {[DQ [LIT_CHARS cobbler-transcript.txt]]})]) (If (DBracket {B1 UNARY_FILE_f {[VarSub TRANSCRIPT]}}) (Com {[LIT_CHARS touch]} {[VarSub TRANSCRIPT]}) ) (If (DBracket {B1 UNARY_FILE_f {[LIT_CHARS cluster.txt]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Using cluster definition from cluster.txt"]]}) (While (Com {[LIT_CHARS read]} {[LIT_CHARS HOSTNAME]} {[LIT_CHARS MACADDR]} {[LIT_CHARS IPADDR]} {[LIT_CHARS ILOIPADDR]} {[LIT_CHARS DOMAIN]} {[LIT_CHARS ROLE]}) (List (If (DBracket {B2 BINARY_STRING_EQUAL {[VarSub HOSTNAME]} {[DQ [LIT_CHARS end]]}}) (Com {[LIT_CHARS continue]}) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub ROLE]]} {[DQ [LIT_CHARS bootstrap]]}}) (Com {[LIT_CHARS continue]}) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[VarSub 1]} {[LIT_CHARS add]}}) (If (DBracket {B? LOGICAL_BINARY_OR {B1 UNARY_STRING_z {[DQ [VarSub EXACTHOST]]}} {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub EXACTHOST]]} {[DQ [VarSub HOSTNAME]]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub EXACTHOST]]} {[DQ [VarSub ROLE]]}}}}) (List (= scope= flags=0 words=[] bindings=[('MATCH', {[DQ [VarSub HOSTNAME]]})]) (= scope= flags=0 words=[] bindings=[('ACTIONSTRING', {[DQ [LIT_CHARS "adding "][VarSub HOSTNAME][LIT_CHARS .][VarSub DOMAIN][LIT_CHARS " ("][VarSub IPADDR][LIT_CHARS ","][VarSub MACADDR][LIT_CHARS ") to cobbler..."]]})]) (Pipeline (Com {[LIT_CHARS echo]} {[VarSub ACTIONSTRING]}) (Com {[LIT_CHARS tee]} {[LIT_CHARS -a]} {[VarSub TRANSCRIPT]}) ) (Com {[LIT_CHARS sudo]} {[LIT_CHARS cobbler]} {[LIT_CHARS system]} {[LIT_CHARS add]} {[LIT_CHARS --name] [LIT_OTHER "="] [VarSub HOSTNAME]} {[LIT_CHARS --hostname] [LIT_OTHER "="] [VarSub HOSTNAME] [LIT_CHARS .] [VarSub DOMAIN]} {[LIT_CHARS --profile] [LIT_OTHER "="] [LIT_CHARS bcpc_host]} {[LIT_CHARS --ip-address] [LIT_OTHER "="] [VarSub IPADDR]} {[LIT_CHARS --mac] [LIT_OTHER "="] [VarSub MACADDR]}) ) ) (DBracket {B2 BINARY_STRING_EQUAL {[VarSub 1]} {[LIT_CHARS remove]}}) (If (DBracket {B? LOGICAL_BINARY_OR {B1 UNARY_STRING_z {[DQ [VarSub EXACTHOST]]}} {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub EXACTHOST]]} {[DQ [VarSub HOSTNAME]]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub EXACTHOST]]} {[DQ [VarSub ROLE]]}}}}) (List (= scope= flags=0 words=[] bindings=[('MATCH', {[DQ [VarSub HOSTNAME]]})]) (= scope= flags=0 words=[] bindings=[('ACTIONSTRING', {[DQ [LIT_CHARS "removing "][VarSub HOSTNAME][LIT_CHARS " from cobbler..."]]})]) (Pipeline (Com {[LIT_CHARS echo]} {[VarSub ACTIONSTRING]}) (Com {[LIT_CHARS tee]} {[LIT_CHARS -a]} {[VarSub TRANSCRIPT]}) ) (Com {[LIT_CHARS sudo]} {[LIT_CHARS cobbler]} {[LIT_CHARS system]} {[LIT_CHARS remove]} {[LIT_CHARS --name] [LIT_OTHER "="] [VarSub HOSTNAME]}) ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Usage: "][\ LIT_ESCAPED_CHAR "\\\""][VarSub 1][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " unrecognized"]]}) (Com {[LIT_CHARS exit]}) ) ) ) ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Error: No cluster definition (cluster.txt) available"]]}) (Com {[LIT_CHARS exit]}) ) ) (If (DBracket {B! {B1 UNARY_STRING_z {[DQ [VarSub MATCH]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cobbler sync..."]]}) (Com {[LIT_CHARS sudo]} {[LIT_CHARS cobbler]} {[LIT_CHARS sync]}) ) (ElseTrue) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub EXACTHOST]]}}) (Com {[LIT_CHARS echo]} {[LIT_CHARS No]} {[LIT_CHARS hosts]} {[LIT_CHARS defined] [LIT_COMMA ","]} {[LIT_CHARS no]} {[LIT_CHARS action]} {[LIT_CHARS taken.]}) (ElseTrue) (Com {[LIT_CHARS echo]} {[LIT_CHARS Error]} {[LIT_OTHER ":"]} {[LIT_CHARS Host]} {[DQ [LIT_CHARS "'"][VarSub 2][LIT_CHARS "'"]]} {[LIT_CHARS unrecognized] [LIT_COMMA ","]} {[LIT_CHARS no]} {[LIT_CHARS action]} {[LIT_CHARS taken.]}) ) ) )