Merge branch 'master' into fonction

merge-requests/273/head
patrick 8 years ago committed by GitHub
commit e5e8f8dba3

@ -77,7 +77,7 @@ set_timezone() {
DIALOG " $_ConfBseTimeHC " --yesno "$_TimeZQ ${ZONE}/${SUBZONE}?" 0 0
if [[ $? -eq 0 ]]; then
arch_chroot "ln -s /usr/share/zoneinfo/posix/${ZONE}/${SUBZONE} /etc/localtime" 2>$ERR
arch_chroot "ln -sf /usr/share/zoneinfo/${ZONE}/${SUBZONE} /etc/localtime" 2>$ERR
check_for_error "$FUNCNAME" "$?"
else
config_base_menu
@ -228,6 +228,7 @@ install_base() {
KERNEL="n"
mhwd-kernel -l | awk '/linux/ {print $2}' > /tmp/.available_kernels
kernels=$(cat /tmp/.available_kernels)
[[ -e /tmp/.base_installed ]] && rm /tmp/.base_installed
# User to select initsystem
DIALOG " $_ChsInit " --menu "$_WarnOrc" 0 0 2 \
@ -292,7 +293,8 @@ install_base() {
else
# If at least one kernel selected, proceed with installation.
basestrap ${MOUNTPOINT} $(cat /tmp/.base)
basestrap ${MOUNTPOINT} $(cat /tmp/.base) 2>$ERR
check_for_error "install basepkgs" "$?"
# If root is on btrfs volume, amend mkinitcpio.conf
[[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf
@ -302,19 +304,25 @@ install_base() {
# Use mhwd to install selected kernels with right kernel modules
# This is as of yet untested
# arch_chroot "mhwd-kernel -i $(cat ${PACKAGES} | xargs -n1 | grep -f /tmp/.available_kernels | xargs)"
# arch_chroot "mhwd-kernel -i $(cat ${PACKAGES} | xargs -n1 | grep -f /tmp/.available_kernels | xargs)"
# If the virtual console has been set, then copy config file to installation
[[ -e /tmp/vconsole.conf ]] && cp -f /tmp/vconsole.conf ${MOUNTPOINT}/etc/vconsole.conf 2>$ERR
check_for_error "copy vconsole.conf" "$?"
# If specified, copy over the pacman.conf file to the installation
[[ $COPY_PACCONF -eq 1 ]] && cp -f /etc/pacman.conf ${MOUNTPOINT}/etc/pacman.conf 2>$ERR
check_for_error "copy pacman.conf" "$?"
# if branch was chosen, use that also in installed system. If not, use the system setting
if [[ -e ${BRANCH} ]]; then
sed -i "/Branch =/c\Branch = $(cat ${BRANCH})/" ${MOUNTPOINT}/etc/pacman-mirrors.conf
sed -i "/Branch =/c\Branch = $(cat ${BRANCH})/" ${MOUNTPOINT}/etc/pacman-mirrors.conf 2>$ERR
check_for_error "set target branch -> $(cat ${BRANCH})" "$?"
else
sed -i "/Branch =/c$(grep "Branch =" /etc/pacman-mirrors.conf)" ${MOUNTPOINT}/etc/pacman-mirrors.conf
sed -i "/Branch =/c$(grep "Branch =" /etc/pacman-mirrors.conf)" ${MOUNTPOINT}/etc/pacman-mirrors.conf 2>$ERR
check_for_error "use host branch \($(grep "Branch =" /etc/pacman-mirrors.conf)\)" "$?"
fi
touch /tmp/.base_installed
fi
fi
}
@ -329,7 +337,7 @@ uefi_bootloader() {
if [[ $(cat ${PACKAGES}) != "" ]]; then
clear
basestrap ${MOUNTPOINT} $(cat ${PACKAGES} | grep -v "systemd-boot") efibootmgr dosfstools 2>$ERR
check_for_error "uefi_bootloader" "$?"
check_for_error "$FUNCNAME" "$?"
case $(cat ${PACKAGES}) in
"grub")
@ -484,6 +492,7 @@ bios_bootloader() {
install_bootloader() {
check_mount
check_base
if [[ $SYSTEM == "BIOS" ]]; then
bios_bootloader
@ -670,7 +679,7 @@ setup_graphics_card() {
sed -i 's/MODULES=""/MODULES="nouveau"/' ${MOUNTPOINT}/etc/mkinitcpio.conf
fi
check_for_error "$FUNCNAME" "$?"
check_for_error "$FUNCNAME $(cat /tmp/.driver)" "$?"
install_graphics_menu
}

@ -172,17 +172,19 @@ install_manjaro_de_wm() {
# remove zsh
sed -i '/^zsh$/d' /tmp/.edition
check_for_error "install pkgs: $(cat /tmp/.desktop)" "$?"
# basestrap the parsed package list to the new root
basestrap -i ${MOUNTPOINT} $(cat /tmp/.edition /usr/share/manjaro-architect/package-lists/input-drivers | sort | uniq)
basestrap -i ${MOUNTPOINT} $(cat /tmp/.edition /usr/share/manjaro-architect/package-lists/input-drivers | sort | uniq) 2>$ERR
check_for_error "install pkgs: $(cat /tmp/.desktop)" "$?"
# copy the profile overlay to the new root
echo "Copying overlay files to the new root"
cp -r "$overlay"* ${MOUNTPOINT} 2>$ERR
check_for_error "${overlay}* ${MOUNTPOINT}" "$?"
check_for_error "copy overlay" "$?"
# Copy settings to root account
cp -ar $MOUNTPOINT/etc/skel/. $MOUNTPOINT/root/
cp -ar $MOUNTPOINT/etc/skel/. $MOUNTPOINT/root/ 2>$ERR
check_for_error "copy root config" "$?"
# copy settings to already created users
if [[ -e "$(echo /mnt/home/*)" ]]; then
for home in $(echo $MOUNTPOINT/home/*); do

@ -186,14 +186,14 @@ create_partitions() {
"ext2" "mkfs.ext2 -q" \
"ext3" "mkfs.ext3 -q" \
"ext4" "mkfs.ext4 -q" \
"f2fs" "mkfs.f2fs -l" \
"f2fs" "mkfs.f2fs -q" \
"jfs" "mkfs.jfs -q" \
"nilfs2" "mkfs.nilfs2 -fq" \
"ntfs" "mkfs.ntfs -q" \
"reiserfs" "mkfs.reiserfs -q" \
"vfat" "mkfs.vfat -F32" \
"xfs" "mkfs.xfs -f" 2>${ANSWER}
cat ${ANSWER} > /tmp/.fs
case $(cat ${ANSWER}) in
"$_FSSkip") FILESYSTEM="$_FSSkip"
;;
@ -211,7 +211,7 @@ create_partitions() {
CHK_NUM=8
fs_opts="data=journal data=writeback dealloc discard noacl noatime nobarrier nodelalloc"
;;
"f2fs") FILESYSTEM="mkfs.f2fs -l"
"f2fs") FILESYSTEM="mkfs.f2fs -q"
fs_opts="data_flush disable_roll_forward disable_ext_identify discard fastboot flush_merge \
inline_xattr inline_data inline_dentry no_heap noacl nobarrier noextent_cache noinline_data norecovery"
CHK_NUM=16
@ -287,9 +287,9 @@ mount_partitions() {
# Use special mounting options if selected, else standard mount
if [[ $(cat ${MOUNT_OPTS}) != "" ]]; then
mount -o $(cat ${MOUNT_OPTS}) ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>$ERR
mount -t $(cat /tmp/.fs) -o $(cat ${MOUNT_OPTS}) ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>$ERR
else
mount ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>$ERR
mount -t $(cat /tmp/.fs) ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>$ERR
fi
check_for_error "$FUNCNAME" "$?"

@ -294,7 +294,7 @@ rank_mirrors() {
"unstable" "-" off 2>${BRANCH}
clear
[[ ! -z "$(cat ${BRANCH})" ]] && pacman-mirrors -gib "$(cat ${BRANCH})" && \
check_for_error "branch selected: $(cat ${BRANCH})" "$?"
check_for_error "$FUNCNAME branch $(cat ${BRANCH})" "$?"
}
# Originally adapted from AIS. Added option to allow users to edit the mirrorlist.
@ -346,9 +346,9 @@ check_mount() {
# Ensure that Manjaro has been installed
check_base() {
if [[ ! -e ${MOUNTPOINT}/etc ]]; then
if [[ ! -e /tmp/.base_installed ]]; then
DIALOG " $_ErrTitle " --msgbox "$_ErrNoBase" 0 0
main_menu_online
install_base_menu
fi
}
@ -360,8 +360,8 @@ inst_needed() {
# install a pkg in the chroot if not installed
check_pkg() {
if ! arch_chroot "pacman -Q $1" ; then
basestrap "$1" 2>$ERR
check_for_error "install missing pkg $1 to target." "$?"
fi
if ! arch_chroot "pacman -Q $1" ; then
basestrap "$1" 2>$ERR
check_for_error "install missing pkg $1 to target." "$?"
fi
}

Loading…
Cancel
Save