Commit 79679781 authored by Philip Müller's avatar Philip Müller
Browse files

Merge pull request #124 from manjaro/devel

v0.9.11
parents 2980fc59 7522f8da
Version=0.9.10
Version=0.9.11
PREFIX = /usr/local
SYSCONFDIR = /etc
......
......@@ -46,10 +46,11 @@ usage() {
echo ' -q Query settings and pretend'
echo ' -h Print this help message'
echo ''
echo "If 'command' is unspecified, ${0##*/} will launch /bin/sh."
echo " If 'command' is unspecified, ${0##*/} will launch /bin/sh."
echo ''
echo " If 'automount' is true, ${0##*/} will launch /bin/bash"
echo " and ${chroots_dir}/manjaro-chroot."
echo ''
echo "If 'automount' is true, ${0##*/} will launch /bin/bash"
echo "and ${chroots_dir}/manjaro-chroot."
echo ''
exit $1
}
......@@ -62,8 +63,8 @@ while getopts ${opts} arg; do
case "${arg}" in
a) automount=true ;;
q) pretend=true ;;
*) echo "invalid argument ${arg}"; usage 1;;
h|?) usage 0 ;;
*) echo "invalid argument ${arg}"; usage 1 ;;
esac
done
shift $(( OPTIND - 1 ))
......@@ -77,6 +78,16 @@ if ${automount};then
${pretend} && display_settings && exit 1
if [[ -z $(cat /proc/modules | grep dm_mod) ]];then
vgscan
vgchange -ay
if [[ -d /run/systemd ]]; then
systemctl start lvmetad
else
rc-service lvmetad start
fi
fi
os_list=$(detect)
select_os
else
......
......@@ -281,9 +281,9 @@ write_isomounts(){
echo '' >> $1
msg2 "Writing livecd entry ..."
echo "${arch}/livecd-image.sqfs ${arch} / squashfs" >> $1
if [[ -f Packages-Xorg ]] ; then
msg2 "Writing pkgs entry ..."
echo "${arch}/pkgs-image.sqfs ${arch} / squashfs" >> $1
if [[ -f Packages-Mhwd ]] ; then
msg2 "Writing mhwd entry ..."
echo "${arch}/mhwd-image.sqfs ${arch} / squashfs" >> $1
fi
if [[ -f "${packages_custom}" ]] ; then
msg2 "Writing ${custom} entry ..."
......
......@@ -116,9 +116,14 @@ write_calamares_users_conf(){
brand_calamares_settings_conf(){
local conf="$1/usr/share/calamares/settings.conf"
local branding="$1/usr/share/calamares/branding/manjaro-${custom}"
local branding="$1/usr/share/calamares/branding/${iso_name}-${custom}"
if [[ -d $branding ]];then
sed -i -e "s|branding: manjaro|branding: manjaro-${custom}|g" "$conf"
sed -i -e "s|^.*branding:.*|branding: ${iso_name}-${custom}|" "$conf"
else
local branding="$1/usr/share/calamares/branding/${iso_name}"
if [[ -d $branding ]];then
sed -i -e "s|^.*branding:.*|branding: ${iso_name}|" "$conf"
fi
fi
}
......
......@@ -318,7 +318,7 @@ chroot_clean(){
msg "Cleaning up ..."
for image in "$1"/*-image; do
[[ -d ${image} ]] || continue
if [[ $(basename "${image}") != "pkgs-image" ]];then
if [[ $(basename "${image}") != "mhwd-image" ]];then
msg2 "Deleting chroot '$(basename "${image}")'..."
lock 9 "${image}.lock" "Locking chroot '${image}'"
if [[ "$(stat -f -c %T "${image}")" == btrfs ]]; then
......@@ -380,7 +380,7 @@ configure_livecd_image(){
}
make_repo(){
repo-add ${work_dir}/pkgs-image/opt/livecd/pkgs/gfx-pkgs.db.tar.gz ${work_dir}/pkgs-image/opt/livecd/pkgs/*pkg*z
repo-add ${work_dir}/mhwd-image/opt/livecd/pkgs/gfx-pkgs.db.tar.gz ${work_dir}/mhwd-image/opt/livecd/pkgs/*pkg*z
}
# $1: work dir
......
......@@ -111,7 +111,7 @@ copy_livecd_helpers(){
copy_cache_mhwd(){
msg2 "Copying mhwd package cache ..."
rsync -v --files-from="${work_dir}/pkgs-image/cache-packages.txt" /var/cache/pacman/pkg "${work_dir}/pkgs-image/opt/livecd/pkgs"
rsync -v --files-from="${work_dir}/mhwd-image/cache-packages.txt" /var/cache/pacman/pkg "${work_dir}/mhwd-image/opt/livecd/pkgs"
}
# $1: image path
......@@ -195,7 +195,6 @@ make_iso() {
run_xorriso
chown -R "${OWNER}:users" "${cache_dir_iso}"
msg "Done [Build ISO]"
}
......@@ -246,7 +245,12 @@ make_image_custom() {
fi
pacman -Qr "${path}" > "${path}/${custom}-image-pkgs.txt"
cp "${path}/${custom}-image-pkgs.txt" ${cache_dir_iso}/${iso_name}-${custom}-${dist_release}-${arch}-pkgs.txt
if [[ ${initsys} == 'openrc' ]];then
local pkgs_file="${iso_name}-${custom}-${initsys}-${dist_release}-${arch}-pkgs.txt"
else
local pkgs_file="${iso_name}-${custom}-${dist_release}-${arch}-pkgs.txt"
fi
cp "${path}/${custom}-image-pkgs.txt" ${cache_dir_iso}/${pkgs_file}
[[ -d ${custom}-overlay ]] && copy_overlay_custom
configure_custom_image "${path}"
${is_custom_pac_conf} && clean_pacman_conf "${path}"
......@@ -296,8 +300,8 @@ make_image_livecd() {
make_image_mhwd() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
msg "Prepare [pkgs-image]"
local path="${work_dir}/pkgs-image"
msg "Prepare [mhwd-image]"
local path="${work_dir}/mhwd-image"
mkdir -p ${path}/opt/livecd/pkgs
if [[ -n "${custom}" ]] ; then
......@@ -331,7 +335,7 @@ make_image_mhwd() {
rm -f "${path}/cache-packages.txt"
: > ${work_dir}/build.${FUNCNAME}
msg "Done [pkgs-image]"
msg "Done [mhwd-image]"
fi
}
......@@ -590,7 +594,11 @@ load_profile(){
done
custom=${packages_custom#*-}
custom=${custom,,}
iso_file="${iso_name}-${custom}-${dist_release}-${arch}.iso"
if [[ ${initsys} == 'openrc' ]];then
iso_file="${iso_name}-${custom}-${initsys}-${dist_release}-${arch}.iso"
else
iso_file="${iso_name}-${custom}-${dist_release}-${arch}.iso"
fi
check_custom_pacman_conf
......@@ -604,6 +612,7 @@ compress_images(){
local timer=$(get_timer)
make_iso
make_checksum "${iso_file}"
chown -R "${OWNER}:users" "${cache_dir_iso}"
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes"
}
......
......@@ -73,10 +73,9 @@ get_root(){
select_os(){
for system in ${os_list[@]};do
case "${system##*:}" in
'linux') chroot_mount_partitions "${chrootdir}" "${system}" ;;
*) die "Detected: ${system##*:} is not a Linux" ;;
esac
if [[ "${system##*:}" == 'linux' ]];then
chroot_mount_partitions "${chrootdir}" "${system}"
fi
done
}
......@@ -105,7 +104,7 @@ chroot_mount_partitions(){
esac
done
local chroot_arch=$(get_chroot_arch $1)
local chroot_arch=$(get_chroot_arch $1)
[[ ${chroot_arch} == x86-64 ]] && chroot_arch=${chroot_arch/-/_}
case ${arch} in
i686)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment