Skip to content

Commit ab62b7d

Browse files
committed
[update] : Unified post-installation processing scripts
Close #215
1 parent e209cb3 commit ab62b7d

File tree

8 files changed

+40
-371
lines changed

8 files changed

+40
-371
lines changed

channels/cinnamon/airootfs.any/usr/share/calamares/final-process

Lines changed: 0 additions & 60 deletions
This file was deleted.

channels/gnome/airootfs.any/usr/share/calamares/final-process

Lines changed: 0 additions & 57 deletions
This file was deleted.

channels/i3/airootfs.any/usr/share/calamares/final-process

Lines changed: 0 additions & 49 deletions
This file was deleted.

channels/lxde/airootfs.any/usr/share/calamares/final-process

Lines changed: 0 additions & 49 deletions
This file was deleted.

channels/serene/airootfs.any/usr/share/calamares/final-process

Lines changed: 0 additions & 49 deletions
This file was deleted.

channels/share/airootfs.any/usr/share/calamares/final-process

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -e
44

5+
script_path="$( cd -P "$( dirname "$(readlink -f "${0}")" )" && pwd )"
6+
script_name="$(basename "$(realpath "${0}")")"
7+
58
function remove () {
69
local list
710
local file
@@ -21,27 +24,54 @@ while getopts 'u:' arg; do
2124
esac
2225
done
2326

27+
function remove_user_file(){
28+
remove "/etc/skel/${@}"
29+
remove "/home/${user}/${@}"
30+
}
31+
32+
2433
remove /etc/skel/Desktop
25-
remove /etc/skel/.config/gtk-3.0/bookmarks
26-
remove /home/${user}/Desktop/calamares.desktop
27-
remove /root/Desktop/calamares.desktop
28-
remove /home/${user}/.config/gtk-3.0/bookmarks
2934
remove /usr/share/calamares/
3035

36+
remove_user_file "Desktop/calamares.desktop"
37+
remove_user_file ".config/gtk-3.0/bookmarks"
38+
39+
3140
remove /etc/polkit-1/rules.d/01-nopasswork.rules
3241

3342
# Delete unnecessary files of archiso.
34-
# See the following site for details.
35-
# https://wiki.archlinux.jp/index.php/Archiso#Chroot_.E3.81.A8.E3.83.99.E3.83.BC.E3.82.B9.E3.82.B7.E3.82.B9.E3.83.86.E3.83.A0.E3.81.AE.E8.A8.AD.E5.AE.9A
36-
3743
remove /etc/systemd/system/[email protected]/autologin.conf
3844
remove /root/.automated_script.sh
3945
remove /etc/mkinitcpio-archiso.conf
4046
remove /etc/initcpio
4147

48+
# Delete systemd files
4249
remove /etc/systemd/journald.conf.d/volatile-storage.conf
43-
remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
44-
45-
4650
remove /etc/systemd/system/[email protected]
4751
remove /etc/systemd/system/alteriso-reflector.service
52+
53+
# Disabled auto login for LightDM
54+
if [[ -f "/etc/lightdm/lightdm.conf" ]]; then
55+
sed -i "s/^autologin/#autologin/g" "/etc/lightdm/lightdm.conf"
56+
fi
57+
58+
# Disabled auto login for GDM
59+
if [[ -f "/etc/gdm/custom.conf" ]]; then
60+
sed -i "s/Automatic*/#Automatic/g" "/etc/gdm/custom.conf"
61+
fi
62+
63+
# Remove dconf for live environment
64+
remove "/etc/dconf/db/local.d/02-disable-lock"
65+
remove "/etc/dconf/db/local.d/02-live-"*
66+
67+
# Update system datebase
68+
if type dconf > /dev/null 2>&1 ; then
69+
dconf update
70+
fi
71+
72+
# 追加のスクリプトを実行
73+
if [[ -d "${script_path}/${script_name}.d/" ]]; then
74+
for extra_script in "${script_path}/${script_name}.d/"*; do
75+
bash -c "${extra_script} ${user}"
76+
done
77+
fi

channels/xfce-pro/airootfs.any/usr/share/calamares/final-process

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)