Преглед изворни кода

Pass through the minimum password length when creating an image

Bob Mottram пре 8 година
родитељ
комит
0e91aafbbf
3 измењених фајлова са 4 додато и 8 уклоњено
  1. 2
    1
      src/freedombone-image
  2. 0
    7
      src/freedombone-image-customise
  3. 2
    0
      src/freedombone-image-make

+ 2
- 1
src/freedombone-image Прегледај датотеку

382
 	 WIFI_PASSPHRASE="$WIFI_PASSPHRASE" \
382
 	 WIFI_PASSPHRASE="$WIFI_PASSPHRASE" \
383
 	 WIFI_HOTSPOT="$WIFI_HOTSPOT" \
383
 	 WIFI_HOTSPOT="$WIFI_HOTSPOT" \
384
 	 WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \
384
 	 WIFI_NETWORKS_FILE="$WIFI_NETWORKS_FILE" \
385
-	 VARIANT="$VARIANT"
385
+	 VARIANT="$VARIANT" \
386
+	 MINIMUM_PASSWORD_LENGTH="$MINIMUM_PASSWORD_LENGTH"
386
 
387
 
387
 if [ ! "$?" = "0" ]; then
388
 if [ ! "$?" = "0" ]; then
388
 	echo $'Build failed'
389
 	echo $'Build failed'

+ 0
- 7
src/freedombone-image-customise Прегледај датотеку

51
 
51
 
52
 # Minimum number of characters in a password
52
 # Minimum number of characters in a password
53
 MINIMUM_PASSWORD_LENGTH=10
53
 MINIMUM_PASSWORD_LENGTH=10
54
-if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
55
-	MINIMUM_PASSWORD_LENGTH=$(cat /usr/local/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
56
-else
57
-	if [ -f /usr/bin/${PROJECT_NAME} ]; then
58
-		MINIMUM_PASSWORD_LENGTH=$(cat /usr/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
59
-	fi
60
-fi
61
 
54
 
62
 # IP address of the router (gateway)
55
 # IP address of the router (gateway)
63
 ROUTER_IP_ADDRESS="192.168.1.254"
56
 ROUTER_IP_ADDRESS="192.168.1.254"

+ 2
- 0
src/freedombone-image-make Прегледај датотеку

63
 export WIFI_HOTSPOT
63
 export WIFI_HOTSPOT
64
 export WIFI_NETWORKS_FILE
64
 export WIFI_NETWORKS_FILE
65
 export VARIANT
65
 export VARIANT
66
+export MINIMUM_PASSWORD_LENGTH
66
 
67
 
67
 # Locate vmdebootstrap program fetched in Makefile
68
 # Locate vmdebootstrap program fetched in Makefile
68
 basedir=`pwd`
69
 basedir=`pwd`
185
 sudo sed -i "s|WIFI_HOTSPOT=.*|WIFI_HOTSPOT=\"${WIFI_HOTSPOT}\"|g" $TEMP_CUSTOMISE
186
 sudo sed -i "s|WIFI_HOTSPOT=.*|WIFI_HOTSPOT=\"${WIFI_HOTSPOT}\"|g" $TEMP_CUSTOMISE
186
 sudo sed -i "s|WIFI_NETWORKS_FILE=.*|WIFI_NETWORKS_FILE=\"${WIFI_NETWORKS_FILE}\"|g" $TEMP_CUSTOMISE
187
 sudo sed -i "s|WIFI_NETWORKS_FILE=.*|WIFI_NETWORKS_FILE=\"${WIFI_NETWORKS_FILE}\"|g" $TEMP_CUSTOMISE
187
 sudo sed -i "s|VARIANT=.*|VARIANT=\"${VARIANT}\"|g" $TEMP_CUSTOMISE
188
 sudo sed -i "s|VARIANT=.*|VARIANT=\"${VARIANT}\"|g" $TEMP_CUSTOMISE
189
+sudo sed -i "s|MINIMUM_PASSWORD_LENGTH=.*|MINIMUM_PASSWORD_LENGTH=\"${MINIMUM_PASSWORD_LENGTH}\"|g" $TEMP_CUSTOMISE
188
 
190
 
189
 echo $"starting $VMDEBOOTSTRAP"
191
 echo $"starting $VMDEBOOTSTRAP"
190
 # Run vmdebootstrap script to create image
192
 # Run vmdebootstrap script to create image