Print this page
9696 add /etc/system.d support
Portions contributed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Toomas Soome <tsoome@me.com>

@@ -3349,11 +3349,11 @@
         intptr_t fd;
 
         if ((fd = kobj_open(systemfile)) != -1L)
                 kobj_close(fd);
         else
-                systemfile = NULL;
+                systemfile = self_assembly = NULL;
 
         /*CONSTANTCONDITION*/
         while (1) {
                 printf("Name of system file [%s]:  ",
                     systemfile ? systemfile : "/dev/null");

@@ -3361,16 +3361,17 @@
                 console_gets(s0, sizeof (s0));
 
                 if (s0[0] == '\0')
                         break;
                 else if (strcmp(s0, "/dev/null") == 0) {
-                        systemfile = NULL;
+                        systemfile = self_assembly = NULL;
                         break;
                 } else {
                         if ((fd = kobj_open(s0)) != -1L) {
                                 kobj_close(fd);
                                 systemfile = s0;
+                                self_assembly = NULL;
                                 break;
                         }
                 }
                 printf("can't find file %s\n", s0);
         }