die if no relevant services
[freeside.git] / bin / svc_acct.import
index 8343ce8..c22cb0d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct.import,v 1.3 1998-12-10 07:23:16 ivan Exp $
+# $Id: svc_acct.import,v 1.4 1999-03-24 00:43:38 ivan Exp $
 #
 # ivan@sisd.com 98-mar-9
 #
 # don't import /var/spool/freeside/conf/shells!  ivan@sisd.com 98-aug-13
 #
 # $Log: svc_acct.import,v $
-# Revision 1.3  1998-12-10 07:23:16  ivan
+# Revision 1.4  1999-03-24 00:43:38  ivan
+# die if no relevant services
+#
+# Revision 1.3  1998/12/10 07:23:16  ivan
 # use FS::Conf, need user (for datasrc)
 #
 # Revision 1.2  1998/10/13 12:07:51  ivan
@@ -44,6 +47,8 @@ $FS::svc_acct::nossh_hack = 1;
 
 %part_svc=map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_acct'});
 
+die "No services with svcdb svc_acct!\n" unless %part_svc;
+
 print "\n\n", &menu_svc, "\n", <<END;
 Most accounts probably have entries in passwd and users (with Port-Limit
 nonexistant or 1).