move kernel and initsys to manjaro-tools.conf
This commit is contained in:
udeved 2016-02-17 18:56:37 +01:00
parent d514e8a3b6
commit fddd769f84
4 changed files with 42 additions and 27 deletions

View file

@ -22,13 +22,10 @@ import ${LIBDIR}/util.sh
show_profile(){
eval_edition "$1"
load_profile "${run_dir}/${edition}/$1"
msg2 "initsys: %s" "${initsys}"
msg2 "kernel: %s" "${kernel}"
if ${verbose};then
msg2 "work_dir: %s" "${work_dir}"
msg2 "iso_dir: %s" "${iso_dir}"
msg2 "iso_file: %s" "${iso_file}"
msg2 "iso_fs: %s" "${iso_fs}"
msg2 "displaymanager: %s" "${displaymanager}"
msg2 "autologin: %s" "${autologin}"
@ -94,6 +91,8 @@ display_settings(){
msg2 "iso_app_id: %s" "${iso_app_id}"
msg2 "iso_compression: %s" "${iso_compression}"
msg2 "iso_checksum: %s" "${iso_checksum}"
msg2 "initsys: %s" "${initsys}"
msg2 "kernel: %s" "${kernel}"
msg2 "use_overlayfs: %s" "${use_overlayfs}"
msg "BUILD QUEUE:"
@ -127,6 +126,10 @@ usage() {
echo " [default: ${chroots_iso}]"
echo ' -t <dir> Target directory'
echo " [default: ${cache_dir_iso}]"
echo ' -k <name> Kernel to use'
echo " [default: ${kernel}]"
echo ' -z <name> Init system to use'
echo " [default: ${initsys}]"
echo ' -c Disable clean work dir'
echo ' -i Build images only'
echo ' -s Generate iso only'
@ -141,7 +144,7 @@ usage() {
orig_argv=("$@")
opts='p:a:b:r:t:cisvqh'
opts='p:a:b:r:t:k:z:cisvqh'
while getopts "${opts}" arg; do
case "${arg}" in
@ -150,7 +153,8 @@ while getopts "${opts}" arg; do
b) branch="$OPTARG" ;;
r) chroots_iso="$OPTARG" ;;
t) cache_dir_iso="$OPTARG" ;;
k) keep_repo="$OPTARG" ;;
k) kernel="$OPTARG" ;;
z) initsys="$OPTARG" ;;
c) clean_first=false ;;
i) images_only=true ;;
s) iso_only=true ;;

View file

@ -65,6 +65,12 @@
# valid: md5, sha1, sha256, sha384, sha512
# iso_checksum=md5
# possible values: openrc,systemd
# initsys="systemd"
# unset defaults to given value
# kernel="linux44"
# experimental; use overlayfs instead of aufs
# requires minimum 4.0 kernel on the build host and on iso in profile.conf
# use_overlayfs="false"

View file

@ -2,9 +2,6 @@
###### use this file in the profile ######
##########################################
# possible values: openrc,systemd
# initsys="systemd"
# use multilib packages; x86_64 only
# multilib="true"
@ -33,9 +30,6 @@
################ install ################
# unset defaults to given value
# kernel="linux44"
# possible values: grub;systemd-boot
# efi_boot_loader="grub"

View file

@ -185,10 +185,23 @@ init_buildiso(){
[[ -z ${iso_checksum} ]] && iso_checksum='md5'
[[ -z ${initsys} ]] && initsys="systemd"
[[ -z ${kernel} ]] && kernel="linux44"
[[ -z ${use_overlayfs} ]] && use_overlayfs='true'
local used_kernel=$(uname -r)
[[ ${used_kernel%%*.} < "4" ]] && use_overlayfs='false'
local iso_kernel=${kernel:5:1}
[[ ${iso_kernel} < "4" ]] && use_overlayfs='false'
if ${use_overlayfs};then
iso_fs="overlayfs"
else
iso_fs="aufs"
fi
local host_kernel=$(uname -r)
[[ ${host_kernel%%*.} < "4" ]] && use_overlayfs='false'
[[ -z ${profile_repo} ]] && profile_repo='manjaro-tools-iso-profiles'
}
@ -228,7 +241,7 @@ load_config(){
}
unset_profile(){
unset initsys
#unset initsys
unset displaymanager
unset autologin
unset multilib
@ -237,7 +250,7 @@ unset_profile(){
unset nonfree_xorg
unset default_desktop_executable
unset default_desktop_file
unset kernel
#unset kernel
unset efi_boot_loader
unset efi_part_size
unset hostname
@ -264,8 +277,6 @@ load_profile_config(){
[[ -r ${profile_conf} ]] && source ${profile_conf}
[[ -z ${initsys} ]] && initsys="systemd"
[[ -z ${displaymanager} ]] && displaymanager="none"
[[ -z ${autologin} ]] && autologin="true"
@ -282,16 +293,16 @@ load_profile_config(){
[[ -z ${default_desktop_file} ]] && default_desktop_file="none"
[[ -z ${kernel} ]] && kernel="linux44"
local used_kernel=${kernel:5:1}
[[ ${used_kernel} < "4" ]] && use_overlayfs='false'
if ${use_overlayfs};then
iso_fs="overlayfs"
else
iso_fs="aufs"
fi
# [[ -z ${kernel} ]] && kernel="linux44"
#
# local used_kernel=${kernel:5:1}
# [[ ${used_kernel} < "4" ]] && use_overlayfs='false'
#
# if ${use_overlayfs};then
# iso_fs="overlayfs"
# else
# iso_fs="aufs"
# fi
[[ -z ${efi_boot_loader} ]] && efi_boot_loader="grub"