OSDN Git Service

[change] : Renamed _systemctl_service to _safe_systemctl
authorhayao <hayao@fascode.net>
Sat, 14 Aug 2021 14:07:23 +0000 (23:07 +0900)
committerhayao <hayao@fascode.net>
Sat, 14 Aug 2021 14:07:23 +0000 (23:07 +0900)
modules/gdm/airootfs.any/root/customize_airootfs_gdm.sh
modules/kmscon/airootfs.any/root/customize_airootfs_kmscon.sh
modules/pipewire/airootfs.any/root/customize_airootfs_pipewire.sh
modules/share-extra/airootfs.any/root/customize_airootfs_share-extra.sh
modules/share/airootfs.any/root/customize_airootfs.sh
modules/share/airootfs.any/root/functions.sh

index 147a695..a2fdad1 100755 (executable)
@@ -9,10 +9,10 @@
 
 # Enable gdm to auto login
 if [[ "${boot_splash}" =  true ]]; then
-    _systemd_service enable gdm-plymouth.service
+    _safe_systemctl enable gdm-plymouth.service
     
 else
-    _systemd_service enable gdm.service
+    _safe_systemctl enable gdm.service
 fi
 
 
index d606c80..894d082 100755 (executable)
@@ -14,9 +14,9 @@ if [[ -f "/etc/systemd/system/getty@.service.d/autologin.conf" ]]; then
 fi
 
 # Disable default tty
-_systemd_service disable "getty@tty1.service" "getty@.service"
-_systemd_service enable "kmsconvt@tty1.service"
-_systemd_service enable "kmsconvt@tty2.service"
+_safe_systemctl disable "getty@tty1.service" "getty@.service"
+_safe_systemctl enable "kmsconvt@tty1.service"
+_safe_systemctl enable "kmsconvt@tty2.service"
 
 
 # Do not run setterm
index 12f037f..ba14a70 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # Pipewire
-# Do not use _systemd_service because pipewire services are not system but user
+# Do not use _safe_systemctl because pipewire services are not system but user
 # Use flag "--user --global"
 # https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/923
 for _service in "pipewire.service" "pipewire-pulse.service"; do
index 7a67fef..5fc6aa8 100644 (file)
@@ -9,14 +9,14 @@
 
 # Bluetooth
 rfkill unblock all
-_systemd_service enable bluetooth
+_safe_systemctl enable bluetooth
 
 # Snap
-_systemd_service enable snapd.apparmor.service
-_systemd_service enable apparmor.service
-_systemd_service enable snapd.socket
-_systemd_service enable snapd.service
-_systemd_service enable ufw.service
+_safe_systemctl enable snapd.apparmor.service
+_safe_systemctl enable apparmor.service
+_safe_systemctl enable snapd.socket
+_safe_systemctl enable snapd.service
+_safe_systemctl enable ufw.service
 
 
 # Added autologin group to auto login
@@ -25,7 +25,7 @@ usermod -aG autologin ${username}
 
 
 # ntp
-_systemd_service enable systemd-timesyncd.service
+_safe_systemctl enable systemd-timesyncd.service
 
 
 # Update system datebase
index 885810e..e0516aa 100755 (executable)
@@ -157,19 +157,19 @@ run_additional_command "gtk-update-icon-cache -f /usr/share/icons/hicolor"
 
 
 # Enable graphical.
-_systemd_service set-default graphical.target
+_safe_systemctl set-default graphical.target
 
 
 # Enable services.
-_systemd_service enable pacman-init.service
-_systemd_service enable cups.service
-_systemd_service enable NetworkManager.service
-_systemd_service enable alteriso-reflector.service
-_systemd_service disable reflector.service
+_safe_systemctl enable pacman-init.service
+_safe_systemctl enable cups.service
+_safe_systemctl enable NetworkManager.service
+_safe_systemctl enable alteriso-reflector.service
+_safe_systemctl disable reflector.service
 
 
 # TLP
 # See ArchWiki for details.
-_systemd_service enable tlp.service
-_systemd_service mask systemd-rfkill.service
-_systemd_service mask systemd-rfkill.socket
+_safe_systemctl enable tlp.service
+_safe_systemctl mask systemd-rfkill.service
+_safe_systemctl mask systemd-rfkill.socket
index 83c7f1c..03b607a 100644 (file)
@@ -93,8 +93,8 @@ function create_user () {
 
 # systemctl helper
 # Execute the subcommand only when the specified unit is available.
-# Usage: _systemd_service <systemctl subcommand> <service1> <service2> ...
-_systemd_service(){
+# Usage: _safe_systemctl <systemctl subcommand> <service1> <service2> ...
+_safe_systemctl(){
     local _service _command="${1}"
     shift 1
     for _service in "${@}"; do