##// END OF EJS Templates
Added: Configuration template file support (testing)
drtyhlpr -
r117:6c18469854f3
parent child
Show More
@@ -0,0 +1,2
1 # Configuration template file used by rpi23-gen-image.sh
2 RELEASE=jessie
@@ -0,0 +1,3
1 # Configuration template file used by rpi23-gen-image.sh
2 RELEASE=stretch
3 BUILD_KERNEL=true
@@ -0,0 +1,4
1 # Configuration template file used by rpi23-gen-image.sh
2 RPI_MODEL=3
3 RELEASE=jessie
4 BUILD_KERNEL=true
@@ -0,0 +1,4
1 # Configuration template file used by rpi23-gen-image.sh
2 RPI_MODEL=3
3 RELEASE=stretch
4 BUILD_KERNEL=true
@@ -42,3 +42,14 install_exec() {
42 42 # Install file with root exec permissions
43 43 install -o root -g root -m 744 $*
44 44 }
45
46 use_template () {
47 # Test if configuration template file exists
48 if [ ! -r "./templates/${CONFIG_TEMPLATE}" ] ; then
49 echo "error: configuration template ${CONFIG_TEMPLATE} not found"
50 exit 1
51 fi
52
53 # Load template configuration parameters
54 . "./templates/${CONFIG_TEMPLATE}"
55 }
@@ -30,6 +30,11 fi
30 30 # Load utility functions
31 31 . ./functions.sh
32 32
33 # Load parameters from configuration template file
34 if [ ! -z "$CONFIG_TEMPLATE" ] ; then
35 use_template
36 fi
37
33 38 # Introduce settings
34 39 set -e
35 40 echo -n -e "\n#\n# RPi2/3 Bootstrap Settings\n#\n"
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant