瀏覽代碼

Don't repeatedly try to install amd64 kernel

Bob Mottram 8 年之前
父節點
當前提交
22557c6359
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      src/freedombone-utils-setup

+ 4
- 1
src/freedombone-utils-setup 查看文件

203
     architecture_type=$(uname -a)
203
     architecture_type=$(uname -a)
204
 
204
 
205
     if [[ "$architecture_type" == *"amd64"* ]]; then
205
     if [[ "$architecture_type" == *"amd64"* ]]; then
206
-        apt-get -yq install linux-image-amd64
206
+        package_installed=$(dpkg-query -W -f='${Package}\n' linux-image-amd64 2>/dev/null)
207
+        if [ ! $package_installed ]; then
208
+            apt-get -yq install linux-image-amd64
209
+        fi
207
     fi
210
     fi
208
 }
211
 }
209
 
212