@@ -21,12 +21,16 @@ while getopts 'p:bt:l' arg; do
2121done
2222
2323
24-
24+ # Enable and generate languages.
2525sed -i ' s/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
2626locale-gen
2727
28+
29+ # Setting the time zone.
2830ln -sf /usr/share/zoneinfo/UTC /etc/localtime
2931
32+
33+ # Creating a root user.
3034# usermod -s /usr/bin/zsh root
3135usermod -s /bin/bash root
3236cp -aT /etc/skel/ /root/
@@ -36,6 +40,7 @@ LANG=C xdg-user-dirs-update
3640echo -e " ${password} \n${password} " | passwd root
3741
3842
43+ # Create alter user.
3944useradd -m -s /bin/bash alter
4045groupadd sudo
4146usermod -G sudo alter
@@ -45,20 +50,27 @@ chmod 700 -R /home/alter
4550chown alter:alter -R /home/alter
4651echo -e " ${password} \n${password} " | passwd alter
4752
53+
54+ # Set to execute calamares without password as alter user.
4855cat >> /etc/sudoers << 'EOF '
4956alter ALL=NOPASSWD: /usr/bin/calamares
5057alter ALL=NOPASSWD: /usr/bin/calamares_polkit
5158EOF
5259
5360
61+ # Delete unnecessary files for Manjaro.
5462[[ -d /usr/share/calamares/branding/manjaro ]] && rm -rf /usr/share/calamares/branding/manjaro
63+
64+
65+ # Replace wallpaper.
5566if [[ -f /usr/share/backgrounds/xfce/xfce-stripes.png ]]; then
5667 rm /usr/share/backgrounds/xfce/xfce-stripes.png
5768 ln -s /usr/share/backgrounds/alter.png /usr/share/backgrounds/xfce/xfce-stripes.png
5869fi
5970[[ -f /usr/share/backgrounds/alter.png ]] && chmod 644 /usr/share/backgrounds/alter.png
6071
6172
73+ # Replace calamares settings when plymouth is enabled.
6274if [[ $boot_splash = true ]]; then
6375 rm /usr/share/calamares/modules/services.conf
6476 mv /usr/share/calamares/modules/services-plymouth.conf /usr/share/calamares/modules/services.conf
7183 rm /usr/share/calamares/modules/services-plymouth.conf
7284fi
7385
86+
87+ # Replace calamares settings when lts kernel is enabled.
7488if [[ ${lts_kernel} = true ]]; then
7589 rm /usr/share/calamares/modules/unpackfs.conf
7690 mv /usr/share/calamares/modules/unpackfs-lts.conf /usr/share/calamares/modules/unpackfs.conf
8195 rm /usr/share/calamares/modules/initcpio-lts.conf
8296fi
8397
98+
99+ # Enable root login with SSH.
84100sed -i ' s/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
101+
102+
103+ # Enable all mirror lists.
85104sed -i " s/#Server/Server/g" /etc/pacman.d/mirrorlist
105+
106+
107+ # Set to save journal logs only in memory.
86108sed -i ' s/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
87109
110+
111+ # Set the operation when each power button is pressed in systemd power management.
88112sed -i ' s/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
89113sed -i ' s/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
90114sed -i ' s/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
91115
92- # Create Icon Cache
116+
117+ # Create new icon cache
93118gtk-update-icon-cache -f /usr/share/icons/hicolor
94119
95120
96121# To disable start up of lightdm.
97122# If it is enable, Users have to enter password.
98123systemctl disable lightdm
124+ if [[ ${boot_splash} = true ]]; then
125+ systemctl disable lightdm-plymouth.service
126+ fi
99127systemctl enable pacman-init.service choose-mirror.service org.cups.cupsd.service
128+
129+
100130# systemctl set-default multi-user.target
101131systemctl set-default graphical.target
0 commit comments