浏览代码

systemd method of shutting down

Bob Mottram 7 年前
父节点
当前提交
47f32c0583
共有 3 个文件被更改,包括 3 次插入2 次删除
  1. 1
    1
      src/freedombone-controlpanel
  2. 1
    1
      src/freedombone-utils-final
  3. 1
    0
      src/freedombone-utils-wifi

+ 1
- 1
src/freedombone-controlpanel 查看文件

@@ -1369,7 +1369,7 @@ function shut_down_system {
1369 1369
         1) return;;
1370 1370
         255) return;;
1371 1371
     esac
1372
-    shutdown now
1372
+    systemctl poweroff
1373 1373
 }
1374 1374
 
1375 1375
 function restart_system {

+ 1
- 1
src/freedombone-utils-final 查看文件

@@ -73,7 +73,7 @@ $(get_ssh_server_key)
73 73
             echo $'Shutting down the system. Detatch the ethernet cable, attach wifi dongle, then power on again.'
74 74
             echo ''
75 75
             ${PROJECT_NAME}-logging off
76
-            shutdown now
76
+            systemctl poweroff
77 77
             return
78 78
         fi
79 79
         echo $'Turning off logging'

+ 1
- 0
src/freedombone-utils-wifi 查看文件

@@ -41,6 +41,7 @@ ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
41 41
 
42 42
 # Debian stretch has a problem where the formerly predictable wlan0 and eth0
43 43
 # device names get assigned random names. This is a hacky workaround.
44
+# Also adding net.ifnames=0 to kernel options on bootloader may work.
44 45
 function enable_predictable_device_names {
45 46
     if [ $rootdir ]; then
46 47
         chroot "$rootdir" ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules