OSDN Git Service

[update] : Enabled to change the default shell in Calamares.
authorhayao <shun819.mail@gmail.com>
Tue, 28 Apr 2020 00:51:21 +0000 (09:51 +0900)
committerhayao <shun819.mail@gmail.com>
Tue, 28 Apr 2020 00:51:21 +0000 (09:51 +0900)
channels/share/airootfs/root/customize_airootfs.sh
channels/share/airootfs/usr/share/calamares/modules/users.conf [moved from channels/lxde/airootfs/usr/share/calamares/modules/users.conf with 99% similarity]

index cf3f549..c676ead 100755 (executable)
@@ -202,6 +202,8 @@ if [[ ${japanese} = true ]]; then
 fi
 
 
+# Calamares configs
+
 # If the specified kernel is different from calamares configuration, replace the configuration file.
 if [[ ! ${kernel} = "zen" ]]; then
     # initcpio
@@ -212,11 +214,17 @@ if [[ ! ${kernel} = "zen" ]]; then
     remove /usr/share/calamares/modules/unpackfs.conf
     mv /usr/share/calamares/modules/unpackfs/unpackfs-${kernel}.conf /usr/share/calamares/modules/unpackfs.conf
 fi
+
 # Remove configuration files for other kernels.
 remove /usr/share/calamares/modules/initcpio/
 remove /usr/share/calamares/modules/unpackfs/
+
 # Set up calamares removeuser
 sed -i s/%USERNAME%/${username}/g /usr/share/calamares/modules/removeuser.conf
+
+# Set user shell
+sed -i s|%USERSHELL%|"${usershell}"|g /usr/share/calamares/modules/users.conf
+
 # Set INSTALL_DIR
 sed -i s/%INSTALL_DIR%/"${install_dir}"/g /usr/share/calamares/modules/unpackfs.conf
 
@@ -125,7 +125,7 @@ allowWeakPasswordsDefault: false
 #    and rely on a correct configuration file in /etc/default/useradd
 #  - set, non-empty, use that path as shell. No validation is done
 #    that the shell actually exists or is executable.
-userShell: /bin/zsh
+userShell: %USERSHELL%
 
 # Hostname setting
 #
@@ -135,7 +135,7 @@ userShell: /bin/zsh
 #   - *EtcFile*, to write to `/etc/hostname` directly
 #   - *Hostnamed*, to use systemd hostnamed(1) over DBus
 # The default is *EtcFile*.
-setHostname: EtcFile
+setHostname: Hostnamed
 
 # Should /etc/hosts be written with a hostname for this machine
 # (also adds localhost and some ipv6 standard entries).