瀏覽代碼

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,6 +171,13 @@ function read_configuration {
171 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 172
         fi
173 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 181
     echo "System type: $SYSTEM_TYPE"
175 182
 }
176 183
 

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

@@ -263,6 +263,9 @@ function setup_utils {
263 263
     function_check read_configuration
264 264
     read_configuration
265 265
 
266
+    function_check check_system_type
267
+    check_system_type
268
+
266 269
     function_check upgrade_installation
267 270
     upgrade_installation
268 271