Print this page
7851 svccfg restore chokes on services with more than one manpage

@@ -21,10 +21,11 @@
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright 2017 RackTop Systems.
  */
 
 
 /*
  * XML document manipulation routines

@@ -415,10 +416,20 @@
         property_t *p;
         int r;
 
         val = xmlGetProp(n, (xmlChar *)attr);
 
+        /* Some properties may have multiple values. */
+        p = internal_property_find(pgrp, pname);
+        if (p != NULL) {
+                value_t *v = internal_value_new();
+                v->sc_u.sc_string = (char *)val;
+                v->sc_type = ty;
+                internal_attach_value(p, v);
+                return (0);
+        }
+
         p = internal_property_create(pname, ty, 1, val);
         r = internal_attach_property(pgrp, p);
 
         if (r != 0)
                 internal_property_free(p);