New build path variable
[freeradius.git] / scripts / cryptpasswd.in
index e9388ad..dbc0f4f 100755 (executable)
@@ -14,7 +14,7 @@
 #
 #    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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 #
 #    Copyright (C) 2001 The FreeRADIUS Project   http://www.freeradius.org
 #
@@ -34,7 +34,10 @@ sub check_md5 {
 }
 
 sub usage {
-       die "Usage: cryptpasswd [--des|--md5|--check] plaintext_password [crypted_password]\n";
+       $name = $0;
+       $name =~ s,.*/,,;
+
+       die "Usage: $name [--des|--md5|--check] plaintext_password [crypted_password]\n";
 }
 
 @saltc = ( '.', '/', '0'..'9', 'A'..'Z', 'a'..'z' );
@@ -59,7 +62,7 @@ sub main {
                }
        }
 
-       usage() unless ($opt_des || $opt_md5);
+       $opt_des = 1 unless ($opt_des || $opt_md5);
        usage() unless ($#ARGV == 0);
 
        die "DES password hashing not available\n"