summaryrefslogtreecommitdiff
path: root/configs/baseline
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2020-07-17 09:04:29 +0300
committernl6720 <nl6720@gmail.com>2020-07-20 13:39:41 +0300
commit6689537563b5115f0fbd9088fe8ff8c91e5c6b14 (patch)
tree128846ceb552def41c4914ee8539c9723a6f274c /configs/baseline
parent12b02406eb8bb427206e21b138bad3f1a2ec0b19 (diff)
downloadarchiso32-6689537563b5115f0fbd9088fe8ff8c91e5c6b14.tar.xz
Set root user's shell and password with custom /etc/passwd and /etc/shadow
Correct shadow file permissions from build.sh.
Diffstat (limited to 'configs/baseline')
-rw-r--r--configs/baseline/airootfs/etc/shadow1
-rwxr-xr-xconfigs/baseline/build.sh11
2 files changed, 12 insertions, 0 deletions
diff --git a/configs/baseline/airootfs/etc/shadow b/configs/baseline/airootfs/etc/shadow
new file mode 100644
index 0000000..7edfd69
--- /dev/null
+++ b/configs/baseline/airootfs/etc/shadow
@@ -0,0 +1 @@
+root::14871::::::
diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh
index b86c7c8..d283408 100755
--- a/configs/baseline/build.sh
+++ b/configs/baseline/build.sh
@@ -38,6 +38,16 @@ make_setup_mkinitcpio() {
-r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' run
}
+# Prepare working directory and copy custom airootfs files (airootfs)
+make_custom_airootfs() {
+ local _airootfs="${work_dir}/airootfs"
+
+ if [[ -d "${script_path}/airootfs" ]]; then
+ cp -af --no-preserve=ownership -- "${script_path}/airootfs/." "${_airootfs}"
+ [[ -e "${_airootfs}/etc/shadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/shadow"
+ fi
+}
+
# Prepare ${install_dir}/boot/
make_boot() {
mkdir -p "${work_dir}/iso/${install_dir}/boot/${arch}"
@@ -80,6 +90,7 @@ make_iso() {
run_once make_basefs
run_once make_setup_mkinitcpio
+run_once make_custom_airootfs
run_once make_boot
run_once make_syslinux
run_once make_isolinux