ソースを参照

Don't preinstall repos on mesh variant

Bob Mottram 7 年 前
コミット
89d05deae7
共有1 個のファイルを変更した10 個の追加6 個の削除を含む
  1. 10
    6
      src/freedombone-image-customise

+ 10
- 6
src/freedombone-image-customise ファイルの表示

@@ -285,7 +285,7 @@ following commands, then enter your details.
285 285
 }
286 286
 
287 287
 configure_ssh() {
288
-    if [[ $VARIANT == "mesh" || $VARIANT == "meshclient" || $VARIANT == "meshusb" ]]; then
288
+    if [[ $VARIANT == "mesh"* ]]; then
289 289
         return
290 290
     fi
291 291
 
@@ -320,7 +320,7 @@ create_generic_image() {
320 320
     fi
321 321
 
322 322
     # Don't install any configuration. This will be a base system
323
-    if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" ]]; then
323
+    if [[ $VARIANT != "mesh"* ]]; then
324 324
         CONFIG_FILENAME=
325 325
     else
326 326
         touch $rootdir/root/.initial_mesh_setup
@@ -403,7 +403,7 @@ EOF
403 403
     echo "    git checkout stretch" >> $rootdir/root/.bashrc
404 404
     echo "    make install" >> $rootdir/root/.bashrc
405 405
 
406
-    if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then
406
+    if [[ $VARIANT != "mesh"* && $VARIANT != "usb" ]]; then
407 407
         if [[ "$SOCIALINSTANCE" == "gnusocial" ]]; then
408 408
             echo "    ${PROJECT_NAME} menuconfig-gnusocial" >> $rootdir/root/.bashrc
409 409
         else
@@ -433,7 +433,7 @@ EOF
433 433
     echo '                rm /home/fbone/.initial_setup' >> $rootdir/root/.bashrc
434 434
     echo "                touch /root/.remove_${GENERIC_IMAGE_USERNAME}" >> $rootdir/root/.bashrc
435 435
     echo '                shred -zu ~/login.txt' >> $rootdir/root/.bashrc
436
-    if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then
436
+    if [[ $VARIANT != "mesh"* && $VARIANT != "usb" ]]; then
437 437
         echo '                SSH_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_ssh/hostname)' >> $rootdir/root/.bashrc
438 438
 
439 439
         echo '                if [ ${#SSH_ONION_HOSTNAME} -lt 2 ]; then' >> $rootdir/root/.bashrc
@@ -583,7 +583,7 @@ INSTALL_DIR=$HOME/build
583 583
 INSTALLING_MESH=
584 584
 
585 585
 initialise_mesh() {
586
-    if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" ]]; then
586
+    if [[ $VARIANT != "mesh"* ]]; then
587 587
         return
588 588
     fi
589 589
     if [[ $DEBIAN_INSTALL_ONLY != "no" ]]; then
@@ -1236,6 +1236,10 @@ function image_install_nodejs {
1236 1236
 }
1237 1237
 
1238 1238
 function image_preinstall_repos {
1239
+    if [[ $VARIANT == "mesh"* ]]; then
1240
+        return
1241
+    fi
1242
+
1239 1243
     if [ ! -d $rootdir/repos ]; then
1240 1244
         mkdir $rootdir/repos
1241 1245
     fi
@@ -1364,7 +1368,7 @@ if [ -n "$CUSTOM_SETUP" ]; then
1364 1368
     chroot "$rootdir" gdebi -n /tmp/"$(basename $CUSTOM_SETUP)"
1365 1369
 fi
1366 1370
 
1367
-if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "mesh" ]]; then
1371
+if [[ $VARIANT != "mesh"* ]]; then
1368 1372
     chroot "$rootdir" apt-get install -y openssh-server
1369 1373
 fi
1370 1374
 chroot "$rootdir" apt-get install -y sudo git dialog build-essential