Revision: 7889
http://sourceforge.net/p/astlinux/code/7889
Author: abelbeck
Date: 2016-10-14 21:06:29 +0000 (Fri, 14 Oct 2016)
Log Message:
-----------
check-default-passwd, add an option to specify the path_to_.htpasswd for admin
Modified Paths:
--------------
branches/1.0/project/astlinux/target_skeleton/usr/sbin/check-default-passwd
Modified: branches/1.0/project/astlinux/target_skeleton/usr/sbin/check-default-passwd
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/usr/sbin/check-default-passwd 2016-10-13 12:40:57 UTC (rev 7888)
+++ branches/1.0/project/astlinux/target_skeleton/usr/sbin/check-default-passwd 2016-10-14 21:06:29 UTC (rev 7889)
@@ -5,7 +5,8 @@
##
SYSTEM_ROOT_PASSWD="/etc/shadow"
-WEB_GUI_HTPASSWD="/stat/var/www/admin/.htpasswd"
+HTPASSWD="$2"
+WEB_GUI_HTPASSWD="${HTPASSWD:-/stat/var/www/admin/.htpasswd}"
case $1 in
@@ -18,7 +19,7 @@
admin)
if [ -f "$WEB_GUI_HTPASSWD" ]; then
- if grep -q 'admin:6kERs0/UltqFI' "$WEB_GUI_HTPASSWD" || [ ! -f "/oldroot/mnt/asturw$WEB_GUI_HTPASSWD" ]; then
+ if grep -q 'admin:6kERs0/UltqFI' "$WEB_GUI_HTPASSWD" || [ -z "$HTPASSWD" -a ! -f "/oldroot/mnt/asturw$WEB_GUI_HTPASSWD" ]; then
echo "$WEB_GUI_HTPASSWD"
exit 0
fi
@@ -26,7 +27,7 @@
;;
*)
- echo "Usage: check-default-passwd root|admin" >&2
+ echo "Usage: check-default-passwd root|admin [path_to_.htpasswd]" >&2
;;
esac
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|