Browse Source

Use backports kernel if possible

Bob Mottram 8 years ago
parent
commit
ab03b8e159
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      src/freedombone-utils-setup

+ 12
- 0
src/freedombone-utils-setup View File

@@ -138,6 +138,15 @@ function reset_usb_devices {
138 138
     udevadm control --reload-rules
139 139
 }
140 140
 
141
+function install_backports_kernel {
142
+    # install backports kernel if possible
143
+    architecture_type=$(uname -a)
144
+
145
+    if [[ "$architecture_type" == *"amd64"* ]]; then
146
+        apt-get -yq install linux-image-amd64 -t jessie-backports
147
+    fi
148
+}
149
+
141 150
 function initial_setup {
142 151
     if [[ $(is_completed $FUNCNAME) == "1" ]]; then
143 152
         return
@@ -321,6 +330,9 @@ function setup_utils {
321 330
     read_config_param "PROJECT_REPO"
322 331
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
323 332
 
333
+    function_check install_backports_kernel
334
+    install_backports_kernel
335
+
324 336
     function_check create_completion_file
325 337
     create_completion_file
326 338