s3: piddir creation fix part 2.
[ira/wip.git] / examples / scripts / users_and_groups / createdomobj.pl
index 36e0c0f9fd080865f2cf9927c0f33dcc0d6d815e..919f75ad07699f1445ba1e5367690c2d35044296 100755 (executable)
@@ -19,8 +19,7 @@
 # more details.
 #
 # You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 675
-# Mass Ave, Cambridge, MA 02139, USA.
+# this program; if not, see <http://www.gnu.org/licenses/>.
 #
 
 #
@@ -40,7 +39,7 @@ my $rpccli_cmd        = "rpcclient";
 my $server;
 my $num_targets        = 1;
 my $startnum;                          # if empty, don't add numbers to prefix
-my $prefix     = $target_type;         # name-prefix
+my $prefix;                            # name-prefix
 my $path;                              # path to rpcclient command
 my $rpccli_path        = $rpccli_cmd;
 my $creds;
@@ -103,6 +102,8 @@ if (exists($options{n})) {
 
 if (exists($options{p})) {
        $prefix = $options{p};
+} else {
+       $prefix = $target_type;
 }
 
 if (exists($options{P})) {