diff options
Diffstat (limited to 'archiso/mkarchiso')
-rwxr-xr-x | archiso/mkarchiso | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 6c88474..e09ad54 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -147,7 +147,7 @@ _show_config () { # Install desired packages to root-image _pacman () { - _msg_info "Installing packages to '${work_dir}/root-image/'" + _msg_info "Installing packages to '${work_dir}/root-image/'..." if [[ "${quiet}" = "y" ]]; then mkarchroot -n -C "${pacman_conf}" -f "${work_dir}/root-image" $* &> /dev/null @@ -157,6 +157,7 @@ _pacman () # Cleanup find "${work_dir}" -name "*.pacnew" -name "*.pacsave" -name "*.pacorig" -delete + _msg_info "Packages installed successfully!" } # Cleanup root-image @@ -190,6 +191,10 @@ _cleanup () { if [[ -d "${work_dir}/root-image/tmp" ]]; then find "${work_dir}/root-image/tmp" -mindepth 1 -delete fi + # Delete etc/mtab if not is a symlink. + if [[ ! -L "${work_dir}/root-image/etc/mtab" ]]; then + rm -f "${work_dir}/root-image/etc/mtab" + fi } # Makes a SquashFS filesystem image of file/directory passes as argument with desired compression. @@ -249,6 +254,7 @@ _mkfs () { fi _msg_info "Creating ${_fs_type} image of ${_fs_size} MiB" + rm -f "${_fs_img}" dd of="${_fs_img}" count=0 bs=1M seek=${_fs_size} &> /dev/null local _qflag="" if [[ ${quiet} == "y" ]]; then @@ -374,8 +380,8 @@ command_create () { _msg_info "These packages are already installed, skipping." else mkdir -p "${work_dir}/root-image/" - : > "${work_dir}/create.${_pkg_list_hash}" _pacman "${pkg_list}" + : > "${work_dir}/create.${_pkg_list_hash}" fi } |