From c8710510b2bc369bdbf5804f0c77cafea9319a44 Mon Sep 17 00:00:00 2001 From: Philip Date: Wed, 25 Jan 2017 13:12:16 +0100 Subject: [PATCH 01/10] [lsb-release] has to be changed in root-image --- lib/util-iso-image.sh | 3 +-- lib/util-iso.sh | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index 66a17d6..0ac6fe5 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -113,7 +113,6 @@ configure_mhwd_drivers(){ } configure_lsb(){ - [[ -f $1/boot/grub/grub.cfg ]] && rm $1/boot/grub/grub.cfg if [ -e $1/etc/lsb-release ] ; then msg2 "Configuring lsb-release" sed -i -e "s/^.*DISTRIB_RELEASE.*/DISTRIB_RELEASE=${dist_release}/" $1/etc/lsb-release @@ -248,7 +247,6 @@ configure_thus(){ configure_live_image(){ msg "Configuring [livefs]" configure_hosts "$1" - configure_lsb "$1" configure_mhwd "$1" configure_system "$1" configure_services "$1" @@ -352,4 +350,5 @@ clean_up_image(){ fi fi find "$1" -name *.pacnew -name *.pacsave -name *.pacorig -delete + [[ -f $1/boot/grub/grub.cfg ]] && rm $1/boot/grub/grub.cfg } diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 1eae3c2..48d13e6 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -242,6 +242,8 @@ make_image_root() { reset_pac_conf "${path}" + configure_lsb "${path}" + clean_up_image "${path}" : > ${work_dir}/build.${FUNCNAME} msg "Done [Base installation] (rootfs)" From ce14b131ee620c3c0bc9fcbe0804c80c682fdaa3 Mon Sep 17 00:00:00 2001 From: Philip Date: Wed, 25 Jan 2017 13:27:45 +0100 Subject: [PATCH 02/10] [util-iso-image] fix grub.cfg cleanup --- lib/util-iso-image.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index 0ac6fe5..319c78c 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -350,5 +350,8 @@ clean_up_image(){ fi fi find "$1" -name *.pacnew -name *.pacsave -name *.pacorig -delete - [[ -f $1/boot/grub/grub.cfg ]] && rm $1/boot/grub/grub.cfg + file=$1/boot/grub/grub.cfg + if [[ -f "$file" ]]; then + rm $file + fi } From a80dee0c18f9aaa21df2f215ebc92312d8efc021 Mon Sep 17 00:00:00 2001 From: Philip Date: Wed, 25 Jan 2017 15:42:41 +0100 Subject: [PATCH 03/10] [util-yaml] add avatarFilePath - @oberon2007: please corect me if this is wrong and '~' should have used instead --- lib/util-yaml.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util-yaml.sh b/lib/util-yaml.sh index 08ed715..62e094f 100644 --- a/lib/util-yaml.sh +++ b/lib/util-yaml.sh @@ -158,6 +158,7 @@ write_users_conf(){ echo "setRootPassword: true" >> "$conf" # must be true, else some options get hidden echo "doReusePassword: false" >> "$conf" # only used in old 'users' module echo "availableShells: /bin/bash, /bin/zsh" >> "$conf" # only used in new 'users' module + echo "avatarFilePath: ~/.face" >> "$conf" # mostly used file-name for avatar } write_packages_conf(){ From 9d37573dea937c2ee9d5381762c234f3c992b9ac Mon Sep 17 00:00:00 2001 From: udeved Date: Tue, 31 Jan 2017 23:42:50 +0100 Subject: [PATCH 04/10] buildiso/check-yaml: remove plymouth theme setting --- bin/buildiso.in | 1 - bin/check-yaml.in | 1 - data/profile.conf.example | 3 --- docbook/profile.conf.xml | 9 --------- lib/util-iso-image.sh | 7 ------- lib/util-yaml.sh | 14 +++++++------- lib/util.sh | 3 --- 7 files changed, 7 insertions(+), 31 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 55e2de2..fe2e0e1 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -31,7 +31,6 @@ show_profile(){ msg2 "nonfree_mhwd: %s" "${nonfree_mhwd}" msg2 "pxe_boot: %s" "${pxe_boot}" msg2 "plymouth_boot: %s" "${plymouth_boot}" - ${plymouth_boot} && msg2 "plymouth_theme: %s" "${plymouth_theme}" [[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}" diff --git a/bin/check-yaml.in b/bin/check-yaml.in index 5effd18..05adc8a 100644 --- a/bin/check-yaml.in +++ b/bin/check-yaml.in @@ -28,7 +28,6 @@ show_profile(){ msg2 "nonfree_mhwd: %s" "${nonfree_mhwd}" msg2 "pxe_boot: %s" "${pxe_boot}" msg2 "plymouth_boot: %s" "${plymouth_boot}" - ${plymouth_boot} && msg2 "plymouth_theme: %s" "${plymouth_theme}" [[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}" diff --git a/data/profile.conf.example b/data/profile.conf.example index a4133bd..ada4b6d 100644 --- a/data/profile.conf.example +++ b/data/profile.conf.example @@ -46,9 +46,6 @@ # use geoip # geoip="true" -# unset defaults to given value -# plymouth_theme=manjaro-elegant - # unset defaults to given values # names must match systemd service names # enable_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep') diff --git a/docbook/profile.conf.xml b/docbook/profile.conf.xml index d283d69..de2bb40 100644 --- a/docbook/profile.conf.xml +++ b/docbook/profile.conf.xml @@ -132,15 +132,6 @@ along with systemd; If not, see . - - plymouth_theme= - - Takes the name of the plymouth - theme. It should be the directory of a valid - plymouth theme installed in /usr/share/plymouth/themes/ - - - enable_systemd= diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index 319c78c..5d8f9cc 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -48,13 +48,6 @@ umount_img() { # fi # } -configure_plymouth(){ - if [[ -f "$1"/usr/bin/plymouth ]];then - msg2 "Configuring plymouth: %s" "${plymouth_theme}" - local conf=$1/etc/plymouth/plymouthd.conf - sed -i -e "s/^.*Theme=.*/Theme=${plymouth_theme}/" "${conf}" - fi -} add_svc_rc(){ if [[ -f $1/etc/init.d/$2 ]];then diff --git a/lib/util-yaml.sh b/lib/util-yaml.sh index 62e094f..34b52c7 100644 --- a/lib/util-yaml.sh +++ b/lib/util-yaml.sh @@ -257,12 +257,12 @@ write_netinstall_conf(){ echo "groupsUrl: ${netgroups}/$(get_yaml)" >> "$conf" } -write_plymouthcfg_conf(){ - local conf="${modules_dir}/plymouthcfg.conf" - msg2 "Writing %s ..." "${conf##*/}" - echo "---" > "$conf" - echo "plymouth_theme: ${plymouth_theme}" >> "$conf" -} +# write_plymouthcfg_conf(){ +# local conf="${modules_dir}/plymouthcfg.conf" +# msg2 "Writing %s ..." "${conf##*/}" +# echo "---" > "$conf" +# echo "plymouth_theme: ${plymouth_theme}" >> "$conf" +# } write_locale_conf(){ local conf="${modules_dir}/locale.conf" @@ -317,7 +317,7 @@ write_settings_conf(){ echo " - localecfg" >> "$conf" echo " - luksopenswaphookcfg" >> "$conf" echo " - luksbootkeyfile" >> "$conf" - echo " - plymouthcfg" >> "$conf" && write_plymouthcfg_conf +# echo " - plymouthcfg" >> "$conf" && write_plymouthcfg_conf echo " - initcpiocfg" >> "$conf" echo " - initcpio" >> "$conf" && write_initcpio_conf echo " - users" >> "$conf" diff --git a/lib/util.sh b/lib/util.sh index ed405c0..086a0f6 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -411,8 +411,6 @@ load_profile_config(){ [[ -z ${username} ]] && username="manjaro" - [[ -z ${plymouth_theme} ]] && plymouth_theme="manjaro-elegant" - [[ -z ${password} ]] && password="manjaro" [[ -z ${login_shell} ]] && login_shell='/bin/bash' @@ -501,7 +499,6 @@ reset_profile(){ unset netgroups unset geoip unset plymouth_boot - unset plymouth_theme } check_profile(){ From 7b3acd66dbab8d7264bb72c6f772244e709295f9 Mon Sep 17 00:00:00 2001 From: udeved Date: Tue, 31 Jan 2017 23:50:49 +0100 Subject: [PATCH 05/10] util: remove unused code --- lib/util.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/util.sh b/lib/util.sh index 086a0f6..a33ce9c 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -602,13 +602,6 @@ load_pkgs(){ ;; esac - local _plymouth _plymouth_rm - if ${plymouth_boot};then - _plymouth="s|>plymouth||g" - else - _plymouth_rm="s|>plymouth.*||g" - fi - local _edition _edition_rm case "${edition}" in 'sonar') @@ -646,8 +639,6 @@ load_pkgs(){ | sed "$_kernel" \ | sed "$_edition" \ | sed "$_edition_rm" \ - | sed "$_plymouth" \ - | sed "$_plymouth_rm" \ | sed "$_clean") if [[ $1 == "${packages_mhwd}" ]]; then From cf97457f6a5b2fc622ec918cefd0b85c384c0bee Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 1 Feb 2017 10:16:59 +0100 Subject: [PATCH 06/10] buildiso: clean up; rename some internal vars to make them more logical in terms of mechanics --- lib/util-iso-aufs.sh | 30 +++++++++++++++--------------- lib/util-iso-boot.sh | 2 +- lib/util-iso-image.sh | 10 ---------- lib/util-iso-overlayfs.sh | 32 ++++++++++++++++---------------- lib/util-iso.sh | 36 ++++++++++++------------------------ lib/util-yaml.sh | 8 -------- lib/util.sh | 1 - 7 files changed, 44 insertions(+), 75 deletions(-) diff --git a/lib/util-iso-aufs.sh b/lib/util-iso-aufs.sh index a23f3b6..7174ba3 100644 --- a/lib/util-iso-aufs.sh +++ b/lib/util-iso-aufs.sh @@ -9,32 +9,32 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -track_image() { +track_fs() { info "%s mount: [%s]" "${iso_fs}" "$6" - mount "$@" && IMAGE_ACTIVE_MOUNTS=("$6" "${IMAGE_ACTIVE_MOUNTS[@]}") + mount "$@" && FS_ACTIVE_MOUNTS=("$6" "${FS_ACTIVE_MOUNTS[@]}") } # $1: new branch -mount_image(){ - IMAGE_ACTIVE_MOUNTS=() - track_image -t aufs -o br="$1":${work_dir}/rootfs=ro none "$1" +mount_fs_root(){ + FS_ACTIVE_MOUNTS=() + track_fs -t aufs -o br="$1":${work_dir}/rootfs=ro none "$1" } -mount_image_custom(){ - IMAGE_ACTIVE_MOUNTS=() - track_image -t aufs -o br="$1":${work_dir}/desktopfs=ro:${work_dir}/rootfs=ro none "$1" +mount_fs_desktop(){ + FS_ACTIVE_MOUNTS=() + track_fs -t aufs -o br="$1":${work_dir}/desktopfs=ro:${work_dir}/rootfs=ro none "$1" } -mount_image_live(){ - IMAGE_ACTIVE_MOUNTS=() - track_image -t aufs -o br="$1":${work_dir}/livefs=ro:${work_dir}/desktopfs=ro:${work_dir}/rootfs=ro none "$1" +mount_fs_live(){ + FS_ACTIVE_MOUNTS=() + track_fs -t aufs -o br="$1":${work_dir}/livefs=ro:${work_dir}/desktopfs=ro:${work_dir}/rootfs=ro none "$1" } # $1: image path -umount_image(){ - if [[ -n ${IMAGE_ACTIVE_MOUNTS[@]} ]];then - umount "${IMAGE_ACTIVE_MOUNTS[@]}" - unset IMAGE_ACTIVE_MOUNTS +umount_fs(){ + if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]];then + umount "${FS_ACTIVE_MOUNTS[@]}" + unset FS_ACTIVE_MOUNTS find $1 -name '.wh.*' -delete &> /dev/null fi } diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index 9f918b3..a617855 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -26,7 +26,7 @@ set_mkinicpio_hooks(){ } gen_boot_args(){ -# local args=(quiet) + local args=(quiet) local args=() if ${plymouth_boot};then args+=(splash) diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index 5d8f9cc..dcd67e5 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -40,15 +40,6 @@ umount_img() { fi } -# has_plymouth(){ -# if $(chroot "$1" which plymouth);then -# return 0 -# else -# return 1 -# fi -# } - - add_svc_rc(){ if [[ -f $1/etc/init.d/$2 ]];then msg2 "Setting %s ..." "$2" @@ -243,7 +234,6 @@ configure_live_image(){ configure_mhwd "$1" configure_system "$1" configure_services "$1" - configure_plymouth "$1" configure_calamares "$1" [[ ${edition} == "sonar" ]] && configure_thus "$1" write_live_session_conf "$1" diff --git a/lib/util-iso-overlayfs.sh b/lib/util-iso-overlayfs.sh index b624cb5..e180346 100644 --- a/lib/util-iso-overlayfs.sh +++ b/lib/util-iso-overlayfs.sh @@ -9,35 +9,35 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -track_image() { +track_fs() { info "%s mount: [%s]" "${iso_fs}" "$5" - mount "$@" && IMAGE_ACTIVE_MOUNTS=("$5" "${IMAGE_ACTIVE_MOUNTS[@]}") + mount "$@" && FS_ACTIVE_MOUNTS=("$5" "${FS_ACTIVE_MOUNTS[@]}") } # $1: new branch -mount_image(){ - IMAGE_ACTIVE_MOUNTS=() +mount_fs_root(){ + FS_ACTIVE_MOUNTS=() mkdir -p "${mnt_dir}/work" - track_image -t overlay overlay -olowerdir="${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" + track_fs -t overlay overlay -olowerdir="${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" } -mount_image_custom(){ - IMAGE_ACTIVE_MOUNTS=() +mount_fs_desktop(){ + FS_ACTIVE_MOUNTS=() mkdir -p "${mnt_dir}/work" - track_image -t overlay overlay -olowerdir="${work_dir}/desktopfs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" + track_fs -t overlay overlay -olowerdir="${work_dir}/desktopfs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" } -mount_image_live(){ - IMAGE_ACTIVE_MOUNTS=() +mount_fs_live(){ + FS_ACTIVE_MOUNTS=() mkdir -p "${mnt_dir}/work" - track_image -t overlay overlay -olowerdir="${work_dir}/livefs":"${work_dir}/desktopfs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" + track_fs -t overlay overlay -olowerdir="${work_dir}/livefs":"${work_dir}/desktopfs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" } -umount_image(){ - if [[ -n ${IMAGE_ACTIVE_MOUNTS[@]} ]];then - info "%s umount: [%s]" "${iso_fs}" "${IMAGE_ACTIVE_MOUNTS[@]}" - umount "${IMAGE_ACTIVE_MOUNTS[@]}" - unset IMAGE_ACTIVE_MOUNTS +umount_fs(){ + if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]];then + info "%s umount: [%s]" "${iso_fs}" "${FS_ACTIVE_MOUNTS[@]}" + umount "${FS_ACTIVE_MOUNTS[@]}" + unset FS_ACTIVE_MOUNTS rm -rf "${mnt_dir}/work" fi } diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 48d13e6..8bd7a88 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -22,7 +22,7 @@ error_function() { error "A failure occurred in %s()." "$1" plain "Aborting..." fi - umount_image + umount_fs umount_img exit 2 } @@ -63,7 +63,7 @@ run_safe() { trap_exit() { local sig=$1; shift error "$@" - umount_image + umount_fs trap -- "$sig" kill "-$sig" "$$" } @@ -266,18 +266,18 @@ make_image_desktop() { reset_pac_conf "${path}" - umount_image + umount_fs clean_up_image "${path}" : > ${work_dir}/build.${FUNCNAME} msg "Done [Desktop installation] (desktopfs)" fi } -mount_image_select(){ +mount_fs_select(){ if [[ -f "${packages_desktop}" ]]; then - mount_image_custom "$1" + mount_fs_desktop "$1" else - mount_image "$1" + mount_fs_root "$1" fi } @@ -287,7 +287,7 @@ make_image_live() { local path="${work_dir}/livefs" mkdir -p ${path} - mount_image_select "${path}" + mount_fs_select "${path}" chroot_create "${path}" "${packages}" @@ -297,7 +297,7 @@ make_image_live() { reset_pac_conf "${path}" - umount_image + umount_fs # Clean up GnuPG keys rm -rf "${path}/etc/pacman.d/gnupg" @@ -313,7 +313,7 @@ make_image_mhwd() { local path="${work_dir}/mhwdfs" mkdir -p ${path}${mhwd_repo} - mount_image_select "${path}" + mount_fs_select "${path}" reset_pac_conf "${path}" @@ -328,7 +328,7 @@ make_image_mhwd() { make_repo "${path}" configure_mhwd_drivers "${path}" - umount_image + umount_fs clean_up_image "${path}" : > ${work_dir}/build.${FUNCNAME} msg "Done [drivers repository] (mhwdfs)" @@ -346,7 +346,7 @@ make_image_boot() { local path="${work_dir}/bootfs" mkdir -p ${path} - mount_image_live "${path}" + mount_fs_live "${path}" # if [[ ${gpg_key} ]]; then # gpg --export ${gpg_key} >${work_dir}/gpgkey @@ -363,7 +363,7 @@ make_image_boot() { mv ${path}/boot/initramfs.img ${boot}/${target_arch}/initramfs.img prepare_boot_extras "${path}" "${boot}" - umount_image + umount_fs rm -R ${path} : > ${work_dir}/build.${FUNCNAME} @@ -474,18 +474,6 @@ compress_images(){ show_elapsed_time "${FUNCNAME}" "${timer}" } -# prepare_boot_loaders(){ -# local timer=$(get_timer) -# run_safe "make_image_boot" -# run_safe "make_isolinux" -# run_safe "make_syslinux" -# if [[ "${target_arch}" == "x86_64" ]]; then -# run_safe "make_efi_usb" -# run_safe "make_efi_dvd" -# fi -# show_elapsed_time "${FUNCNAME}" "${timer}" -# } - prepare_images(){ local timer=$(get_timer) load_pkgs "${profile_dir}/Packages-Root" diff --git a/lib/util-yaml.sh b/lib/util-yaml.sh index 34b52c7..695733c 100644 --- a/lib/util-yaml.sh +++ b/lib/util-yaml.sh @@ -257,13 +257,6 @@ write_netinstall_conf(){ echo "groupsUrl: ${netgroups}/$(get_yaml)" >> "$conf" } -# write_plymouthcfg_conf(){ -# local conf="${modules_dir}/plymouthcfg.conf" -# msg2 "Writing %s ..." "${conf##*/}" -# echo "---" > "$conf" -# echo "plymouth_theme: ${plymouth_theme}" >> "$conf" -# } - write_locale_conf(){ local conf="${modules_dir}/locale.conf" msg2 "Writing %s ..." "${conf##*/}" @@ -317,7 +310,6 @@ write_settings_conf(){ echo " - localecfg" >> "$conf" echo " - luksopenswaphookcfg" >> "$conf" echo " - luksbootkeyfile" >> "$conf" -# echo " - plymouthcfg" >> "$conf" && write_plymouthcfg_conf echo " - initcpiocfg" >> "$conf" echo " - initcpio" >> "$conf" && write_initcpio_conf echo " - users" >> "$conf" diff --git a/lib/util.sh b/lib/util.sh index a33ce9c..71d4b8f 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -401,7 +401,6 @@ load_profile_config(){ [[ -z ${pxe_boot} ]] && pxe_boot="true" [[ -z ${plymouth_boot} ]] && plymouth_boot="true" -# [[ ${initsys} == 'openrc' ]] && plymouth_boot="false" [[ -z ${nonfree_mhwd} ]] && nonfree_mhwd="true" From 8588ec366c04dc3d4b898e7e9efab530b34ed112 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 1 Feb 2017 13:39:36 +0100 Subject: [PATCH 07/10] util-iso: fix leftover mount call --- lib/util-iso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 8bd7a88..ed43802 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -256,7 +256,7 @@ make_image_desktop() { local path="${work_dir}/desktopfs" mkdir -p ${path} - mount_image "${path}" + mount_fs_root "${path}" chroot_create "${path}" "${packages}" From 80c6cb33d183a65fa798129a7c236ffccff89448 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 1 Feb 2017 20:20:23 +0100 Subject: [PATCH 08/10] buildiso: add a specific net mount function to support netinstall profile configuration --- lib/util-iso-aufs.sh | 5 +++++ lib/util-iso-overlayfs.sh | 6 ++++++ lib/util-iso.sh | 6 +++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/util-iso-aufs.sh b/lib/util-iso-aufs.sh index 7174ba3..52350ea 100644 --- a/lib/util-iso-aufs.sh +++ b/lib/util-iso-aufs.sh @@ -30,6 +30,11 @@ mount_fs_live(){ track_fs -t aufs -o br="$1":${work_dir}/livefs=ro:${work_dir}/desktopfs=ro:${work_dir}/rootfs=ro none "$1" } +mount_fs_net(){ + FS_ACTIVE_MOUNTS=() + track_fs -t aufs -o br="$1":${work_dir}/livefs=ro:${work_dir}/rootfs=ro none "$1" +} + # $1: image path umount_fs(){ if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]];then diff --git a/lib/util-iso-overlayfs.sh b/lib/util-iso-overlayfs.sh index e180346..2780502 100644 --- a/lib/util-iso-overlayfs.sh +++ b/lib/util-iso-overlayfs.sh @@ -33,6 +33,12 @@ mount_fs_live(){ track_fs -t overlay overlay -olowerdir="${work_dir}/livefs":"${work_dir}/desktopfs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" } +mount_fs_net(){ + FS_ACTIVE_MOUNTS=() + mkdir -p "${mnt_dir}/work" + track_fs -t overlay overlay -olowerdir="${work_dir}/livefs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1" +} + umount_fs(){ if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]];then info "%s umount: [%s]" "${iso_fs}" "${FS_ACTIVE_MOUNTS[@]}" diff --git a/lib/util-iso.sh b/lib/util-iso.sh index ed43802..a7eaff1 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -346,7 +346,11 @@ make_image_boot() { local path="${work_dir}/bootfs" mkdir -p ${path} - mount_fs_live "${path}" + if [[ -f "${packages_desktop}" ]]; then + mount_fs_live "${path}" + else + mount_fs_net "${path}" + fi # if [[ ${gpg_key} ]]; then # gpg --export ${gpg_key} >${work_dir}/gpgkey From bc77e2ee7db71b3f9fb36f492c6071dc441b0efe Mon Sep 17 00:00:00 2001 From: udeved Date: Fri, 3 Feb 2017 01:03:52 +0100 Subject: [PATCH 09/10] buildiso: don't add user to disk grp --- lib/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.sh b/lib/util.sh index 71d4b8f..7effe2e 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -415,7 +415,7 @@ load_profile_config(){ [[ -z ${login_shell} ]] && login_shell='/bin/bash' if [[ -z ${addgroups} ]];then - addgroups="video,power,disk,storage,optical,network,lp,scanner,wheel" + addgroups="video,power,storage,optical,network,lp,scanner,wheel" fi if [[ -z ${enable_systemd[@]} ]];then From 2509fdb3313b6f01c08be4f8d4d121142599ef57 Mon Sep 17 00:00:00 2001 From: udeved Date: Fri, 3 Feb 2017 15:20:43 +0100 Subject: [PATCH 10/10] util-yaml: update --- lib/util-yaml.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/util-yaml.sh b/lib/util-yaml.sh index 695733c..6368056 100644 --- a/lib/util-yaml.sh +++ b/lib/util-yaml.sh @@ -166,6 +166,8 @@ write_packages_conf(){ msg2 "Writing %s ..." "${conf##*/}" echo "---" > "$conf" echo "backend: pacman" >> "$conf" + echo '' >> "$conf" + echo "update_db: true" >> "$conf" } write_welcome_conf(){ @@ -240,7 +242,7 @@ get_yaml(){ if ${chrootcfg};then args+=('chrootcfg') else - args+=("${profile}/packages") + args+=("packages") fi args+=("${initsys}") [[ ${edition} == 'sonar' ]] && args+=("${edition}")