From: hayao Date: Wed, 29 Jul 2020 09:37:18 +0000 (+0900) Subject: [add] : journald config and logind config (archiso 45) X-Git-Tag: rc3-alpha1~238^2~15 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=42f7fa491c6b767843edae81564b87ad9813f604;p=alterlinux%2Falterlinux.git [add] : journald config and logind config (archiso 45) Use drop-in files for journald and logind configuration --- diff --git a/channels/cinnamon/airootfs.any/usr/share/calamares/final-process b/channels/cinnamon/airootfs.any/usr/share/calamares/final-process index 7e58f8a0..0db345a9 100644 --- a/channels/cinnamon/airootfs.any/usr/share/calamares/final-process +++ b/channels/cinnamon/airootfs.any/usr/share/calamares/final-process @@ -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/lxde/airootfs.any/usr/share/calamares/final-process b/channels/lxde/airootfs.any/usr/share/calamares/final-process index 4507bf9a..e15d771c 100644 --- a/channels/lxde/airootfs.any/usr/share/calamares/final-process +++ b/channels/lxde/airootfs.any/usr/share/calamares/final-process @@ -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 index 00000000..1fe948ff --- /dev/null +++ b/channels/share/airootfs.any/etc/systemd/journald.conf.d/volatile-storage.conf @@ -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 index 00000000..456bf04c --- /dev/null +++ b/channels/share/airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf @@ -0,0 +1,4 @@ +[Login] +HandleSuspendKey=ignore +HandleHibernateKey=ignore +HandleLidSwitch=ignore \ No newline at end of file diff --git a/channels/share/airootfs.any/root/customize_airootfs.sh b/channels/share/airootfs.any/root/customize_airootfs.sh index d50c96c3..1929a32e 100755 --- a/channels/share/airootfs.any/root/customize_airootfs.sh +++ b/channels/share/airootfs.any/root/customize_airootfs.sh @@ -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 diff --git a/channels/share/airootfs.any/usr/share/calamares/final-process b/channels/share/airootfs.any/usr/share/calamares/final-process index b1d1e894..80e1743d 100644 --- a/channels/share/airootfs.any/usr/share/calamares/final-process +++ b/channels/share/airootfs.any/usr/share/calamares/final-process @@ -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/xfce/airootfs.any/usr/share/calamares/final-process b/channels/xfce/airootfs.any/usr/share/calamares/final-process index 4507bf9a..e15d771c 100644 --- a/channels/xfce/airootfs.any/usr/share/calamares/final-process +++ b/channels/xfce/airootfs.any/usr/share/calamares/final-process @@ -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}