diff options
-rw-r--r-- | sbin/slattach/slattach.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index 1fa776e..aa70b11 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -576,6 +576,15 @@ void exit_handler(int ret) /* Remove the PID file */ (void)unlink(pidfilename); + if (config_cmd) { + char *s; + s = (char*) malloc(strlen(config_cmd) + 32); + sprintf (s, "%s %d -1", config_cmd, unit); + syslog(LOG_NOTICE, "Deconfiguring %s (sl%d):", dev, unit); + syslog(LOG_NOTICE, " '%s'", s); + system(s); + free (s); + } /* invoke a shell for exit_cmd. */ if (exit_cmd) { syslog(LOG_NOTICE,"exiting after running %s", exit_cmd); |