Lines Matching defs:script

26  * lsvcrun - run an rc?.d script, modifying appropriate data in the
33 * Each group has the following properties: name, the script name
35 * inode, the inode of the script; and suffix, the suffix of the
36 * script name, e.g. 'foo'.
39 * collect inode before running the script.
41 * When we run a K script, we try to identify and remove the
42 * property group by means of examining the inode and script
43 * suffix. The inode check means more than one script with the
52 * make sure to execute the script anyway in an attempt to keep
53 * things working as they used to. If we can't execute the script,
95 gettext("Usage: %s [-s] script {start | stop}\n"), uu_getpname());
100 * Pick out the script name and convert it for use as an SMF property
194 get_start_pg(const char *script, scf_handle_t *h, scf_service_t *svc,
201 if ((pg_name = start_pg_name(script)) == NULL)
229 "not launching \"%s\".\n"), script);
266 * implies we successfully ran the same script before. We
272 * remove the pg fully after a script failed to run.
277 "seems to be running.\n"), script);
286 "group.\n"), script);
386 * Try and find the property group matching the service this script
389 * Finally, we try for just the script suffix.
392 get_stop_pg(const char *script, scf_handle_t *h, scf_service_t *svc,
399 if (stat(script, &st) != 0) {
400 uu_warn(gettext("Couldn't stat %s (%s).\n"), script,
405 if ((suffix = script_suffix(script)) == NULL) {
420 "doesn't seem to be running.\n"), script);
432 get_script_pg(const char *script, boolean_t start_flag, boolean_t *ok)
486 pg = get_start_pg(script, h, svc, ok);
488 pg = get_stop_pg(script, h, svc, ok);
497 prepare_contract(const char *script, const char *action)
520 svc_name = path_to_svc_name(script);
521 (void) strlcat(svc_strbuf, svc_name ? svc_name : script,
703 set_legacy_service(scf_propertygroup_t *pg, const char *script, ino_t inode)
741 * fails, we can use the script name anyway.
743 svc_name = path_to_svc_name(script);
746 (void *)(svc_name ? svc_name : script)) != 0)
757 if ((suffix = script_suffix(script)) != NULL) {
801 const char *restarter, *script, *action;
837 script = argv[optind];
849 * add the pg now so we can exit before launching the script if we
854 pg = get_script_pg(script, start_flag, &pg_ok);
865 if (prepare_contract(script, action) == -1) {
883 (void) printf(gettext("Executing legacy init script \"%s\" "
884 "despite previous errors.\n"), script);
886 (void) printf(gettext("Executing legacy init script \"%s\".\n"),
887 script);
890 if (stat(script, &st) != 0) {
891 uu_warn(gettext("Couldn't stat %s (%s).\n"), script,
916 arg2 = script;
921 arg3 = script;
969 (void) printf(gettext("Legacy init script \"%s\" failed due "
970 "to signal %s.\n"), script, buf);
972 (void) printf(gettext("Legacy init script \"%s\" exited with "
973 "return code %d.\n"), script, WEXITSTATUS(exitstatus));
978 set_legacy_service(pg, script, st.st_ino);