Merge branch 'devel'

This commit is contained in:
Philip 2015-09-27 09:23:21 +02:00
commit ba461e2502
16 changed files with 210 additions and 82 deletions

View file

@ -1,4 +1,4 @@
Version=0.9.12 Version=0.9.13
PREFIX = /usr/local PREFIX = /usr/local
SYSCONFDIR = /etc SYSCONFDIR = /etc

View file

@ -164,7 +164,8 @@ pacman_conf="${PKGDATADIR}/pacman-${pacman_conf_arch}.conf"
makepkg_conf="${PKGDATADIR}/makepkg-${arch}.conf" makepkg_conf="${PKGDATADIR}/makepkg-${arch}.conf"
mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf" mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf"
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}") chroot_run_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}")
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf} -B "${build_mirror}/${branch}" -L)
mkchrootpkg_args+=(-r ${work_dir}) mkchrootpkg_args+=(-r ${work_dir})

27
conf/base-devel_nosystemd Normal file
View file

@ -0,0 +1,27 @@
autoconf
automake
binutils
bison
eudev-systemdcompat
fakeroot
file
findutils
flex
gawk
gcc
gettext
grep
groff
gzip
libtool
m4
make
pacman
patch
pkg-config
sed
sudo
texinfo
util-linux
which
lib32-flex

56
conf/base_nosystemd Normal file
View file

@ -0,0 +1,56 @@
bash
bzip2
coreutils
cryptsetup
device-mapper
dhcpcd
diffutils
eudev-systemdcompat
e2fsprogs
file
filesystem
findutils
gawk
gcc-libs
gettext
glibc
grep
gzip
inetutils
iproute2
iputils
jfsutils
less
licenses
logrotate
lvm2
man-db
man-pages
manjaro-hotfixes
manjaro-system
mdadm
mhwd
mhwd-db
nano
openrc-core
pacman
pciutils
pcmciautils
perl
procps-ng
psmisc
reiserfsprogs
s-nail
sed
shadow
sysfsutils
tar
texinfo
usbutils
util-linux
vi
which
xfsprogs
tcp_wrappers
lib32-tcp_wrappers

View file

@ -257,7 +257,7 @@ miso_mount_handler() {
done < "${isomounts}" done < "${isomounts}"
if [ "${copytoram}" = "y" ]; then if [ "${copytoram}" = "y" ]; then
/bin/umount /bootmnt /bin/umount -d /bootmnt
else else
_mnt_bind /bootmnt "${newroot}/bootmnt" _mnt_bind /bootmnt "${newroot}/bootmnt"
fi fi

View file

@ -35,6 +35,6 @@ miso_loop_mount_handler () {
msg "::: Deataching loop device ${_dev_loop}" msg "::: Deataching loop device ${_dev_loop}"
losetup -d ${_dev_loop} losetup -d ${_dev_loop}
msg "::: Unmounting ${img_dev}" msg "::: Unmounting ${img_dev}"
umount ${img_dev} umount -d ${img_dev}
fi fi
} }

View file

@ -248,7 +248,7 @@ miso_mount_handler() {
mount -t overlay overlay -olowerdir="${overlayfs:1}",upperdir="/rw_branch/upper",workdir="/rw_branch/work" "${newroot}/" mount -t overlay overlay -olowerdir="${overlayfs:1}",upperdir="/rw_branch/upper",workdir="/rw_branch/work" "${newroot}/"
if [ "${copytoram}" = "y" ]; then if [ "${copytoram}" = "y" ]; then
/bin/umount /bootmnt /bin/umount -d /bootmnt
else else
_mnt_bind /bootmnt "${newroot}/bootmnt" _mnt_bind /bootmnt "${newroot}/bootmnt"
fi fi

View file

@ -38,6 +38,7 @@ copy_initcpio(){
cp /usr/lib/initcpio/install/miso* $1/usr/lib/initcpio/install cp /usr/lib/initcpio/install/miso* $1/usr/lib/initcpio/install
cp mkinitcpio.conf $1/etc/mkinitcpio-${iso_name}.conf cp mkinitcpio.conf $1/etc/mkinitcpio-${iso_name}.conf
set_mkinicpio_hooks "$1/etc/mkinitcpio-${iso_name}.conf" set_mkinicpio_hooks "$1/etc/mkinitcpio-${iso_name}.conf"
sed -e 's|"$@"|"$@" >/dev/null 2>&1|' -i $1/usr/lib/initcpio/init
} }
# $1: work_dir # $1: work_dir
@ -53,7 +54,7 @@ copy_efi_loaders(){
msg2 "Copying efi loaders ..." msg2 "Copying efi loaders ..."
cp $1/usr/lib/prebootloader/PreLoader.efi $2/bootx64.efi cp $1/usr/lib/prebootloader/PreLoader.efi $2/bootx64.efi
cp $1/usr/lib/prebootloader/HashTool.efi $2/ cp $1/usr/lib/prebootloader/HashTool.efi $2/
cp ${PKGDATADIR}/efi_shell/systemd-bootx64.efi $2/loader.efi cp $1/usr/lib/systemd/boot/efi/systemd-bootx64.efi $2/loader.efi
} }
copy_boot_images(){ copy_boot_images(){

View file

@ -55,6 +55,13 @@ write_calamares_services_conf(){
echo 'targets:' >> "$conf" echo 'targets:' >> "$conf"
echo ' - name: "graphical"' >> "$conf" echo ' - name: "graphical"' >> "$conf"
echo ' mandatory: false' >> "$conf" echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
echo 'disable:' >> "$conf"
for s in ${disable_openrc[@]};do
echo ' - name: '"$s" >> "$conf"
echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
done
else else
echo 'services:' > "$conf" echo 'services:' > "$conf"
for s in ${start_systemd[@]};do for s in ${start_systemd[@]};do
@ -65,6 +72,13 @@ write_calamares_services_conf(){
echo 'targets:' >> "$conf" echo 'targets:' >> "$conf"
echo ' - name: "graphical"' >> "$conf" echo ' - name: "graphical"' >> "$conf"
echo ' mandatory: true' >> "$conf" echo ' mandatory: true' >> "$conf"
echo '' >> "$conf"
echo 'disable:' >> "$conf"
for s in ${disable_systemd[@]};do
echo ' - name: '"$s" >> "$conf"
echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
done
fi fi
} }
@ -112,6 +126,7 @@ write_calamares_users_conf(){
unset IFS unset IFS
echo "autologinGroup: autologin" >> "$conf" echo "autologinGroup: autologin" >> "$conf"
echo "sudoersGroup: wheel" >> "$conf" echo "sudoersGroup: wheel" >> "$conf"
echo "setRootPassword: true" >> "$conf"
} }
brand_calamares_settings_conf(){ brand_calamares_settings_conf(){

View file

@ -64,7 +64,6 @@ configure_services_live(){
;; ;;
*) *)
msg3 "Unsupported: [${initsys}]!" msg3 "Unsupported: [${initsys}]!"
break
;; ;;
esac esac
} }
@ -103,11 +102,12 @@ configure_services(){
msg2 "Setting $svc ..." msg2 "Setting $svc ..."
chroot $1 systemctl enable $svc &> /dev/null chroot $1 systemctl enable $svc &> /dev/null
done done
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
msg3 "Done configuring [${initsys}]" msg3 "Done configuring [${initsys}]"
;; ;;
*) *)
msg3 "Unsupported: [${initsys}]!" msg3 "Unsupported: [${initsys}]!"
break
;; ;;
esac esac
} }
@ -268,7 +268,9 @@ configure_displaymanager(){
sed -i -e "s|^.*session=.*|session=/usr/bin/$default_desktop_executable|" ${conf} sed -i -e "s|^.*session=.*|session=/usr/bin/$default_desktop_executable|" ${conf}
fi fi
;; ;;
*) break ;; *)
msg3 "Unsupported: [${displaymanager}]!"
;;
esac esac
if [[ ${displaymanager} != "none" ]];then if [[ ${displaymanager} != "none" ]];then
if [[ ${initsys} == 'openrc' ]];then if [[ ${initsys} == 'openrc' ]];then
@ -347,7 +349,27 @@ configure_sysctl(){
fi fi
} }
# Remove pamac auto-update when the network is up, it causes problems when booting in the livecd configure_time(){
if [[ ${initsys} == 'openrc' ]];then
rm $1/etc/runlevels/boot/hwclock
fi
}
# $1: chroot
configure_systemd_live(){
if [[ ${initsys} == 'systemd' ]];then
msg2 "Configuring systemd for livecd"
sed -i 's/#\(Storage=\)auto/\1volatile/' $1/etc/systemd/journald.conf
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' $1/etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' $1/etc/systemd/logind.conf
# Prevent some services to be started in the livecd
echo 'File created by manjaro-tools. See systemd-update-done.service(8).' \
| tee "${path}/etc/.updated" >"${path}/var/.updated"
fi
}
# Remove pamac auto-update when the network is up, it locks de pacman db when booting in the livecd
# $1: chroot # $1: chroot
configure_pamac_live() { configure_pamac_live() {
rm -f $1/etc/NetworkManager/dispatcher.d/99_update_pamac_tray rm -f $1/etc/NetworkManager/dispatcher.d/99_update_pamac_tray
@ -358,6 +380,7 @@ configure_root_image(){
configure_lsb "$1" configure_lsb "$1"
configure_mhwd "$1" configure_mhwd "$1"
configure_sysctl "$1" configure_sysctl "$1"
configure_time "$1"
msg "Done configuring [root-image]" msg "Done configuring [root-image]"
} }
@ -377,6 +400,7 @@ configure_livecd_image(){
configure_accountsservice "$1" "${username}" configure_accountsservice "$1" "${username}"
configure_user "$1" configure_user "$1"
configure_services_live "$1" configure_services_live "$1"
configure_systemd_live "$1"
configure_calamares "$1" configure_calamares "$1"
configure_thus "$1" configure_thus "$1"
configure_pamac_live "$1" configure_pamac_live "$1"

View file

@ -139,7 +139,11 @@ squash_image_dir() {
local highcomp="-b 256K -Xbcj x86" local highcomp="-b 256K -Xbcj x86"
[[ "${iso_compression}" != "xz" ]] && highcomp="" [[ "${iso_compression}" != "xz" ]] && highcomp=""
msg2 "Creating SquashFS image. This may take some time..." msg2 "Creating SquashFS image. This may take some time..."
if [[ "$(basename "$1")" == "mhwd-image" ]]; then
mksquashfs "${1}" "${sq_img}" -noappend -comp lz4 || die "Exit ..."
else
mksquashfs "${1}" "${sq_img}" -noappend -comp ${iso_compression} ${highcomp} || die "Exit ..." mksquashfs "${1}" "${sq_img}" -noappend -comp ${iso_compression} ${highcomp} || die "Exit ..."
fi
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes"
} }

View file

@ -106,11 +106,9 @@ configure_language(){
[[ -z "$KEYMAP" ]] && KEYMAP="us" [[ -z "$KEYMAP" ]] && KEYMAP="us"
[[ -z "$KBLAYOUT" ]] && KBLAYOUT="us" [[ -z "$KBLAYOUT" ]] && KBLAYOUT="us"
# local FALLBACK="en_US"
local TLANG=${LOCALE%.*} local TLANG=${LOCALE%.*}
sed -i -r "s/#(${TLANG}.*UTF-8)/\1/g" $1/etc/locale.gen sed -i -r "s/#(${TLANG}.*UTF-8)/\1/g" $1/etc/locale.gen
# sed -i -r "s/#(${FALLBACK}.*UTF-8)/\1/g" $1/etc/locale.gen
echo "LANG=${LOCALE}.UTF-8" >> $1/etc/environment echo "LANG=${LOCALE}.UTF-8" >> $1/etc/environment
@ -122,11 +120,16 @@ configure_language(){
write_x11_config $1 write_x11_config $1
# echo "LANGUAGE=${LOCALE}:${FALLBACK}" >> $1/etc/locale.conf
loadkeys "${KEYMAP}" loadkeys "${KEYMAP}"
} }
configure_clock(){
if [[ -d /run/openrc ]];then
ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime
echo "Europe/London" > /etc/timezone
fi
}
configure_translation_pkgs(){ configure_translation_pkgs(){
# Determind which language we are using # Determind which language we are using
local LNG_INST=$(cat $1/etc/locale.conf | grep LANG= | cut -d= -f2 | cut -d. -f1) local LNG_INST=$(cat $1/etc/locale.conf | grep LANG= | cut -d= -f2 | cut -d. -f1)
@ -272,7 +275,6 @@ configure_translation_pkgs(){
} }
configure_alsa(){ configure_alsa(){
echo "configure alsa" >> /var/log/livecd.log
# amixer binary # amixer binary
local alsa_amixer="chroot $1 /usr/bin/amixer" local alsa_amixer="chroot $1 /usr/bin/amixer"
@ -328,23 +330,6 @@ configure_alsa(){
$alsa_amixer -c 0 sset "Audigy Analog/Digital Output Jack" off &>/dev/null $alsa_amixer -c 0 sset "Audigy Analog/Digital Output Jack" off &>/dev/null
} }
rm_kalu(){
local base_check_virtualbox=`dmidecode | grep innotek`
local base_check_vmware=`dmidecode | grep VMware`
local base_check_qemu=`dmidecode | grep QEMU`
local base_check_vpc=`dmidecode | grep Microsoft`
if [ -n "$base_check_virtualbox" ]; then
pacman -R kalu --noconfirm --noprogressbar --root $1 &> /dev/null
elif [ -n "$base_check_vmware" ]; then
pacman -R kalu --noconfirm --noprogressbar --root $1 &> /dev/null
elif [ -n "$base_check_qemu" ]; then
pacman -R kalu --noconfirm --noprogressbar --root $1 &> /dev/null
elif [ -n "$base_check_vpc" ]; then
pacman -R kalu --noconfirm --noprogressbar --root $1 &> /dev/null
fi
}
### end shared functions with cli installer ### end shared functions with cli installer
configure_machine_id(){ configure_machine_id(){
@ -382,7 +367,6 @@ configure_env(){
echo "BROWSER=/usr/bin/xdg-open" >> /etc/profile echo "BROWSER=/usr/bin/xdg-open" >> /etc/profile
# add TERM var # add TERM var
if [ -e "/usr/bin/mate-session" ] ; then if [ -e "/usr/bin/mate-session" ] ; then
echo "TERM=mate-terminal" >> /etc/environment echo "TERM=mate-terminal" >> /etc/environment
echo "TERM=mate-terminal" >> /etc/profile echo "TERM=mate-terminal" >> /etc/profile

View file

@ -54,7 +54,7 @@ chroot_clean(){
chroot_update(){ chroot_update(){
msg "Updating chroot for [${branch}] (${arch})..." msg "Updating chroot for [${branch}] (${arch})..."
chroot-run ${mkchroot_args[*]} \ chroot-run ${chroot_run_args[*]} \
"${work_dir}/${OWNER}" \ "${work_dir}/${OWNER}" \
pacman -Syu --noconfirm || abort pacman -Syu --noconfirm || abort

View file

@ -57,11 +57,20 @@ get_timer(){
echo $(date +%s) echo $(date +%s)
} }
get_timer_ms(){
echo $(date +%s%3N)
}
# $1: start timer # $1: start timer
elapsed_time(){ elapsed_time(){
echo $(echo $1 $(get_timer) | awk '{ printf "%0.2f",($2-$1)/60 }') echo $(echo $1 $(get_timer) | awk '{ printf "%0.2f",($2-$1)/60 }')
} }
# $1: start timer
elapsed_time_ms(){
echo $(echo $1 $(get_timer_ms) | awk '{ printf "%0.3f",($2-$1)/1000 }')
}
## ##
# usage : in_array( $needle, $haystack ) # usage : in_array( $needle, $haystack )
# return : 0 - found # return : 0 - found
@ -451,10 +460,18 @@ load_profile_config(){
start_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep') start_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep')
fi fi
if [[ -z ${disable_systemd[@]} ]];then
disable_systemd=('pacman-init')
fi
if [[ -z ${start_openrc[@]} ]];then if [[ -z ${start_openrc[@]} ]];then
start_openrc=('acpid' 'bluetooth' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager') start_openrc=('acpid' 'bluetooth' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
fi fi
if [[ -z ${disable_openrc[@]} ]];then
disable_openrc=('pacman-init')
fi
if [[ -z ${start_systemd_live[@]} ]];then if [[ -z ${start_systemd_live[@]} ]];then
start_systemd_live=('livecd' 'mhwd-live' 'pacman-init') start_systemd_live=('livecd' 'mhwd-live' 'pacman-init')
fi fi

View file

@ -1,58 +1,59 @@
#!/bin/sh #!/bin/sh
livetimer=$(date +%s%3N)
[[ -r /opt/livecd/util.sh ]] && source /opt/livecd/util.sh [[ -r /opt/livecd/util.sh ]] && source /opt/livecd/util.sh
load_profile_config "/opt/livecd/profile.conf" load_profile_config "/opt/livecd/profile.conf"
[[ -r /opt/livecd/util-livecd.sh ]] && source /opt/livecd/util-livecd.sh [[ -r /opt/livecd/util-livecd.sh ]] && source /opt/livecd/util-livecd.sh
echo "Loaded scripts: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
livetimer=$(get_timer_ms)
CONSOLEFONT="$(kernel_cmdline vconsole.font)" CONSOLEFONT="$(kernel_cmdline vconsole.font)"
CONSOLEMAP="$(kernel_cmdline vconsole.font.map)" CONSOLEMAP="$(kernel_cmdline vconsole.font.map)"
arch=$(uname -m) arch=$(uname -m)
echo "Got consolefont and arch: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
echo "update fstab for swap" > /var/log/livecd.log # Activate swap
livetimer=$(get_timer_ms)
# scan_swap
## Systemd should do it
# should or should not?
# [[ -d /run/openrc ]] && configure_swap
configure_swap configure_swap
echo "Activated swap and added to fstab: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
echo "set locale" >> /var/log/livecd.log livetimer=$(get_timer_ms)
# set language
configure_language configure_language
echo "Languaged configured: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
livetimer=$(get_timer_ms)
locale-gen locale-gen
echo "Ran locale-gen: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
echo "configure system" >> /var/log/livecd.log configure_clock
# add BROWSER var # Add BROWSER var in env and workaround for mate-terminal
livetimer=$(get_timer_ms)
configure_env configure_env
echo "Configured env: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
livetimer=$(get_timer_ms)
configure_machine_id configure_machine_id
echo "Configured machine-id: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
echo "configure sudoers" >> /var/log/livecd.log livetimer=$(get_timer_ms)
# do_fix_perms
configure_sudo configure_sudo
echo "Configured sudoers: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
echo "depmod extramodules" >> /var/log/livecd.log livetimer=$(get_timer_ms)
# depmod extramodules
depmod $(cat /usr/lib/modules/$(uname -r)/extramodules/version)
${autologin} && configure_displaymanager_autologin ${autologin} && configure_displaymanager_autologin
echo "Configured displaymanager autologin: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
echo "configure root password" >> /var/log/livecd.log livetimer=$(get_timer_ms)
configure_user_root / configure_user_root /
cp -a /etc/skel/. /root/ cp -a /etc/skel/. /root/
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
# check if we are running inside a virtual machine and unistall kalu livetimer=$(get_timer_ms)
[[ -e "/usr/bin/kalu" ]] && rm_kalu /
configure_alsa / configure_alsa /
# Save settings
# save settings
alsactl -f /etc/asound.state store &>/dev/null alsactl -f /etc/asound.state store &>/dev/null
echo "Configured alsa: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log

View file

@ -6,42 +6,40 @@
USENONFREE="$(kernel_cmdline nonfree no)" USENONFREE="$(kernel_cmdline nonfree no)"
VIDEO="$(kernel_cmdline xdriver no)" VIDEO="$(kernel_cmdline xdriver no)"
# In a live session we should never have a database lock at boot, this is a bug!
# In the past pamac caused issues about that.
# Fixed here: https://github.com/manjaro/manjaro-tools/commit/57a039088ae4485bc5dc411e36a90c0753e670f1
seconds="0" seconds="0"
while [ -e "/var/lib/pacman/db.lck" ]; while [ -e "/var/lib/pacman/db.lck" ];
do do
echo 'Pacman is not ready yet. Will try again in 10 seconds.' >> /var/log/livecd.log echo 'Pacman is not ready yet. Will try again in 10 seconds.' >> /var/log/mhwd-live.log
echo 'Pacman is not ready yet. Will try again in 10 seconds.' >> /var/log/livecd-debug.log echo '----' >> /var/log/mhwd-live.log
echo '----' >> /var/log/livecd-debug.log ps -ef >> /var/log/mhwd-live.log
ps -ef >> /var/log/livecd-debug.log echo '----' >> /var/log/mhwd-live.log
echo '----' >> /var/log/livecd-debug.log
seconds=$(($seconds + 10)) seconds=$(($seconds + 10))
sleep 10 sleep 10
if [[ "$seconds" == "60" ]]; then if [[ "$seconds" == "30" ]]; then
# remove database lock after 60s echo 'Warning: removing pacman db.lck!' >> /var/log/mhwd-live.log
# this might be related to https://github.com/manjaro/pamac/issues/25
# https://github.com/manjaro/manjaro-tools/issues/101
echo 'Warning: removing pacman db.lck!' >> /var/log/livecd.log
echo 'Warning: removing pacman db.lck!' >> /var/log/livecd-debug.log
rm /var/lib/pacman/db.lck rm /var/lib/pacman/db.lck
fi fi
done done
# hwdetect_graphics # hwdetect_graphics
if [[ -e "/opt/livecd/pacman-gfx.conf" ]]; then if [[ -e "/opt/livecd/pacman-gfx.conf" ]]; then
echo "run mhwd" >> /var/log/livecd.log echo "Running MHWD..." >> /var/log/mhwd-live.log
if [[ "${USENONFREE}" == "yes" ]] || [[ "${USENONFREE}" == "true" ]]; then if [[ "${USENONFREE}" == "yes" ]] || [[ "${USENONFREE}" == "true" ]]; then
if [[ "${VIDEO}" == "vesa" ]]; then if [[ "${VIDEO}" == "vesa" ]]; then
mhwd --install pci video-vesa --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/livecd.log mhwd --install pci video-vesa --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/mhwd-live.log
else else
mhwd --auto pci nonfree 0300 --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/livecd.log mhwd --auto pci nonfree 0300 --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/mhwd-live.log
fi fi
else else
if [[ "${VIDEO}" == "vesa" ]]; then if [[ "${VIDEO}" == "vesa" ]]; then
mhwd --install pci video-vesa --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/livecd.log mhwd --install pci video-vesa --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/mhwd-live.log
else else
mhwd --auto pci free 0300 --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/livecd.log mhwd --auto pci free 0300 --pmconfig "/opt/livecd/pacman-gfx.conf" >> /var/log/mhwd-live.log
fi fi
fi fi
fi fi
echo "MHWD DONE" >> /var/log/livecd.log echo "MHWD DONE" >> /var/log/mhwd-live.log