瀏覽代碼

Checking of system type

Bob Mottram 8 年之前
父節點
當前提交
a15ec75aff
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 7
    0
      src/freedombone-utils-config
  2. 3
    0
      src/freedombone-utils-setup

+ 7
- 0
src/freedombone-utils-config 查看文件

171
             CHECK_MESSAGE=$"Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list."
171
             CHECK_MESSAGE=$"Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list."
172
         fi
172
         fi
173
     fi
173
     fi
174
+}
175
+
176
+function check_system_type {
177
+    if [ ${#SYSTEM_TYPE} -eq 0 ]; then
178
+        echo $'Unknown system type'
179
+        exit 763572
180
+    fi
174
     echo "System type: $SYSTEM_TYPE"
181
     echo "System type: $SYSTEM_TYPE"
175
 }
182
 }
176
 
183
 

+ 3
- 0
src/freedombone-utils-setup 查看文件

263
     function_check read_configuration
263
     function_check read_configuration
264
     read_configuration
264
     read_configuration
265
 
265
 
266
+    function_check check_system_type
267
+    check_system_type
268
+
266
     function_check upgrade_installation
269
     function_check upgrade_installation
267
     upgrade_installation
270
     upgrade_installation
268
 
271