OSDN Git Service

[add] : journald config and logind config (archiso 45)
authorhayao <shun819.mail@gmail.com>
Wed, 29 Jul 2020 09:37:18 +0000 (18:37 +0900)
committerhayao <shun819.mail@gmail.com>
Wed, 29 Jul 2020 09:43:47 +0000 (18:43 +0900)
Use drop-in files for journald and logind configuration

channels/cinnamon/airootfs.any/usr/share/calamares/final-process
channels/lxde/airootfs.any/usr/share/calamares/final-process
channels/share/airootfs.any/etc/systemd/journald.conf.d/volatile-storage.conf [new file with mode: 0644]
channels/share/airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf [new file with mode: 0644]
channels/share/airootfs.any/root/customize_airootfs.sh
channels/share/airootfs.any/usr/share/calamares/final-process
channels/xfce/airootfs.any/usr/share/calamares/final-process

index 7e58f8a..0db345a 100644 (file)
@@ -37,9 +37,8 @@ remove /root/.automated_script.sh
 remove /etc/mkinitcpio-archiso.conf
 remove /etc/initcpio
 
-if [[ -f /etc/systemd/journald.conf ]]; then
-    sed -i 's / Storage = volatile /#Storage = auto /' /etc/systemd/journald.conf
-fi
+remove /etc/systemd/journald.conf.d/volatile-storage.conf
+remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
 
 remove /etc/udev/rules.d/81-dhcpcd.rules
 remove /etc/systemd/system/{choose-mirror.service,getty@tty1.service.d}
index 4507bf9..e15d771 100644 (file)
@@ -37,9 +37,8 @@ remove /root/.automated_script.sh
 remove /etc/mkinitcpio-archiso.conf
 remove /etc/initcpio
 
-if [[ -f /etc/systemd/journald.conf ]]; then
-    sed -i 's / Storage = volatile /#Storage = auto /' /etc/systemd/journald.conf
-fi
+remove /etc/systemd/journald.conf.d/volatile-storage.conf
+remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
 
 remove /etc/udev/rules.d/81-dhcpcd.rules
 remove /etc/systemd/system/{choose-mirror.service,getty@tty1.service.d}
diff --git a/channels/share/airootfs.any/etc/systemd/journald.conf.d/volatile-storage.conf b/channels/share/airootfs.any/etc/systemd/journald.conf.d/volatile-storage.conf
new file mode 100644 (file)
index 0000000..1fe948f
--- /dev/null
@@ -0,0 +1,2 @@
+[Journal]
+Storage=volatile
\ No newline at end of file
diff --git a/channels/share/airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf b/channels/share/airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
new file mode 100644 (file)
index 0000000..456bf04
--- /dev/null
@@ -0,0 +1,4 @@
+[Login]
+HandleSuspendKey=ignore
+HandleHibernateKey=ignore
+HandleLidSwitch=ignore
\ No newline at end of file
index d50c96c..1929a32 100755 (executable)
@@ -250,25 +250,13 @@ sed -i s/%OS_NAME%/"${os_name}"/g /usr/lib/os-release
 # Enable root login with SSH.
 sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
 
-
-# Comment out the mirror list.
+# Un comment the mirror list.
 sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
 
-
-# Set to save journal logs only in memory.
-sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
-
 # Set the os name to grub
 grub_os_name="${os_name%' Linux'}"
 sed -i -r  "s/(GRUB_DISTRIBUTOR=).*/\1\"${grub_os_name}\"/g" "/etc/default/grub"
 
-
-# Set the operation when each power button is pressed in systemd power management.
-sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
-sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
-sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
-
-
 # Create new icon cache
 # This is because alter icon was added by airootfs.
 gtk-update-icon-cache -f /usr/share/icons/hicolor
index b1d1e89..80e1743 100644 (file)
@@ -37,9 +37,8 @@ remove /root/.automated_script.sh
 remove /etc/mkinitcpio-archiso.conf
 remove /etc/initcpio
 
-if [[ -f /etc/systemd/journald.conf ]]; then
-    sed -i 's / Storage = volatile /#Storage = auto /' /etc/systemd/journald.conf
-fi
+remove /etc/systemd/journald.conf.d/volatile-storage.conf
+remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
 
 remove /etc/udev/rules.d/81-dhcpcd.rules
 remove /etc/systemd/system/{choose-mirror.service,getty@tty1.service.d}
index 4507bf9..e15d771 100644 (file)
@@ -37,9 +37,8 @@ remove /root/.automated_script.sh
 remove /etc/mkinitcpio-archiso.conf
 remove /etc/initcpio
 
-if [[ -f /etc/systemd/journald.conf ]]; then
-    sed -i 's / Storage = volatile /#Storage = auto /' /etc/systemd/journald.conf
-fi
+remove /etc/systemd/journald.conf.d/volatile-storage.conf
+remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
 
 remove /etc/udev/rules.d/81-dhcpcd.rules
 remove /etc/systemd/system/{choose-mirror.service,getty@tty1.service.d}