浏览代码

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
         1) return;;
1369
         1) return;;
1370
         255) return;;
1370
         255) return;;
1371
     esac
1371
     esac
1372
-    shutdown now
1372
+    systemctl poweroff
1373
 }
1373
 }
1374
 
1374
 
1375
 function restart_system {
1375
 function restart_system {

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

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

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

41
 
41
 
42
 # Debian stretch has a problem where the formerly predictable wlan0 and eth0
42
 # Debian stretch has a problem where the formerly predictable wlan0 and eth0
43
 # device names get assigned random names. This is a hacky workaround.
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
 function enable_predictable_device_names {
45
 function enable_predictable_device_names {
45
     if [ $rootdir ]; then
46
     if [ $rootdir ]; then
46
         chroot "$rootdir" ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
47
         chroot "$rootdir" ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules