Pass through the minimum password length when creating an image
This commit is contained in:
parent
f24a136e77
commit
0e91aafbbf
|
@ -382,7 +382,8 @@ make $IMAGE_TYPE \
|
||||||
WIFI_PASSPHRASE="$WIFI_PASSPHRASE" \
|
WIFI_PASSPHRASE="$WIFI_PASSPHRASE" \
|
||||||
WIFI_HOTSPOT="$WIFI_HOTSPOT" \
|
WIFI_HOTSPOT="$WIFI_HOTSPOT" \
|
||||||
WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \
|
WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \
|
||||||
VARIANT="$VARIANT"
|
VARIANT="$VARIANT" \
|
||||||
|
MINIMUM_PASSWORD_LENGTH="$MINIMUM_PASSWORD_LENGTH"
|
||||||
|
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
echo $'Build failed'
|
echo $'Build failed'
|
||||||
|
|
|
@ -51,13 +51,6 @@ MY_PASSWORD="${PROJECT_NAME}"
|
||||||
|
|
||||||
# Minimum number of characters in a password
|
# Minimum number of characters in a password
|
||||||
MINIMUM_PASSWORD_LENGTH=10
|
MINIMUM_PASSWORD_LENGTH=10
|
||||||
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
||||||
MINIMUM_PASSWORD_LENGTH=$(cat /usr/local/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
|
|
||||||
else
|
|
||||||
if [ -f /usr/bin/${PROJECT_NAME} ]; then
|
|
||||||
MINIMUM_PASSWORD_LENGTH=$(cat /usr/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# IP address of the router (gateway)
|
# IP address of the router (gateway)
|
||||||
ROUTER_IP_ADDRESS="192.168.1.254"
|
ROUTER_IP_ADDRESS="192.168.1.254"
|
||||||
|
|
|
@ -63,6 +63,7 @@ export WIFI_PASSPHRASE
|
||||||
export WIFI_HOTSPOT
|
export WIFI_HOTSPOT
|
||||||
export WIFI_NETWORKS_FILE
|
export WIFI_NETWORKS_FILE
|
||||||
export VARIANT
|
export VARIANT
|
||||||
|
export MINIMUM_PASSWORD_LENGTH
|
||||||
|
|
||||||
# Locate vmdebootstrap program fetched in Makefile
|
# Locate vmdebootstrap program fetched in Makefile
|
||||||
basedir=`pwd`
|
basedir=`pwd`
|
||||||
|
@ -185,6 +186,7 @@ sudo sed -i "s|WIFI_PASSPHRASE=.*|WIFI_PASSPHRASE=\"${WIFI_PASSPHRASE}\"|g" $TEM
|
||||||
sudo sed -i "s|WIFI_HOTSPOT=.*|WIFI_HOTSPOT=\"${WIFI_HOTSPOT}\"|g" $TEMP_CUSTOMISE
|
sudo sed -i "s|WIFI_HOTSPOT=.*|WIFI_HOTSPOT=\"${WIFI_HOTSPOT}\"|g" $TEMP_CUSTOMISE
|
||||||
sudo sed -i "s|WIFI_NETWORKS_FILE=.*|WIFI_NETWORKS_FILE=\"${WIFI_NETWORKS_FILE}\"|g" $TEMP_CUSTOMISE
|
sudo sed -i "s|WIFI_NETWORKS_FILE=.*|WIFI_NETWORKS_FILE=\"${WIFI_NETWORKS_FILE}\"|g" $TEMP_CUSTOMISE
|
||||||
sudo sed -i "s|VARIANT=.*|VARIANT=\"${VARIANT}\"|g" $TEMP_CUSTOMISE
|
sudo sed -i "s|VARIANT=.*|VARIANT=\"${VARIANT}\"|g" $TEMP_CUSTOMISE
|
||||||
|
sudo sed -i "s|MINIMUM_PASSWORD_LENGTH=.*|MINIMUM_PASSWORD_LENGTH=\"${MINIMUM_PASSWORD_LENGTH}\"|g" $TEMP_CUSTOMISE
|
||||||
|
|
||||||
echo $"starting $VMDEBOOTSTRAP"
|
echo $"starting $VMDEBOOTSTRAP"
|
||||||
# Run vmdebootstrap script to create image
|
# Run vmdebootstrap script to create image
|
||||||
|
|
Loading…
Reference in New Issue