1 /* config.c - shell backend configuration file routine */
13 extern char **charray_dup();
23 struct shellinfo *si = (struct shellinfo *) be->be_private;
26 fprintf( stderr, "%s: line %d: shell backend info is null!\n",
31 /* command + args to exec for binds */
32 if ( strcasecmp( argv[0], "bind" ) == 0 ) {
35 "%s: line %d: missing executable in \"bind <executable>\" line\n",
39 si->si_bind = charray_dup( &argv[1] );
41 /* command + args to exec for unbinds */
42 } else if ( strcasecmp( argv[0], "unbind" ) == 0 ) {
45 "%s: line %d: missing executable in \"unbind <executable>\" line\n",
49 si->si_unbind = charray_dup( &argv[1] );
51 /* command + args to exec for searches */
52 } else if ( strcasecmp( argv[0], "search" ) == 0 ) {
55 "%s: line %d: missing executable in \"search <executable>\" line\n",
59 si->si_search = charray_dup( &argv[1] );
61 /* command + args to exec for compares */
62 } else if ( strcasecmp( argv[0], "compare" ) == 0 ) {
65 "%s: line %d: missing executable in \"compare <executable>\" line\n",
69 si->si_compare = charray_dup( &argv[1] );
71 /* command + args to exec for modifies */
72 } else if ( strcasecmp( argv[0], "modify" ) == 0 ) {
75 "%s: line %d: missing executable in \"modify <executable>\" line\n",
79 si->si_modify = charray_dup( &argv[1] );
81 /* command + args to exec for modrdn */
82 } else if ( strcasecmp( argv[0], "modrdn" ) == 0 ) {
85 "%s: line %d: missing executable in \"modrdn <executable>\" line\n",
89 si->si_modrdn = charray_dup( &argv[1] );
91 /* command + args to exec for add */
92 } else if ( strcasecmp( argv[0], "add" ) == 0 ) {
95 "%s: line %d: missing executable in \"add <executable>\" line\n",
99 si->si_add = charray_dup( &argv[1] );
101 /* command + args to exec for delete */
102 } else if ( strcasecmp( argv[0], "delete" ) == 0 ) {
105 "%s: line %d: missing executable in \"delete <executable>\" line\n",
109 si->si_delete = charray_dup( &argv[1] );
111 /* command + args to exec for abandon */
112 } else if ( strcasecmp( argv[0], "abandon" ) == 0 ) {
115 "%s: line %d: missing executable in \"abandon <executable>\" line\n",
119 si->si_abandon = charray_dup( &argv[1] );
124 "%s: line %d: unknown directive \"%s\" in shell database definition (ignored)\n",
125 fname, lineno, argv[0] );