forked from mirrored-repos/manjaro-tools
[livecd] some fixes
This commit is contained in:
parent
dd14970043
commit
1aa91f4961
2 changed files with 49 additions and 33 deletions
|
@ -35,32 +35,32 @@ get_layout(){
|
|||
echo $(kernel_cmdline layout)
|
||||
}
|
||||
|
||||
# find_legacy_keymap(){
|
||||
# file="/opt/livecd/kbd-model-map"
|
||||
# while read -r line || [[ -n $line ]]; do
|
||||
# if [[ -z $line ]] || [[ $line == \#* ]]; then
|
||||
# continue
|
||||
# fi
|
||||
#
|
||||
# mapping=( $line ); # parses columns
|
||||
# if [[ ${#mapping[@]} != 5 ]]; then
|
||||
# continue
|
||||
# fi
|
||||
#
|
||||
# if [[ "$KEYMAP" != "${mapping[0]}" ]]; then
|
||||
# continue
|
||||
# fi
|
||||
#
|
||||
# if [[ "${mapping[3]}" = "-" ]]; then
|
||||
# mapping[3]=""
|
||||
# fi
|
||||
#
|
||||
# X11_LAYOUT=${mapping[1]}
|
||||
# X11_MODEL=${mapping[2]}
|
||||
# X11_VARIANT=${mapping[3]}
|
||||
# x11_OPTIONS=${mapping[4]}
|
||||
# done < $file
|
||||
# }
|
||||
find_legacy_keymap(){
|
||||
file="/opt/livecd/kbd-model-map"
|
||||
while read -r line || [[ -n $line ]]; do
|
||||
if [[ -z $line ]] || [[ $line == \#* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
mapping=( $line ); # parses columns
|
||||
if [[ ${#mapping[@]} != 5 ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ "$KEYMAP" != "${mapping[0]}" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ "${mapping[3]}" = "-" ]]; then
|
||||
mapping[3]=""
|
||||
fi
|
||||
|
||||
X11_LAYOUT=${mapping[1]}
|
||||
X11_MODEL=${mapping[2]}
|
||||
X11_VARIANT=${mapping[3]}
|
||||
x11_OPTIONS=${mapping[4]}
|
||||
done < $file
|
||||
}
|
||||
|
||||
write_x11_config(){
|
||||
# find a x11 layout that matches the keymap
|
||||
|
@ -70,7 +70,7 @@ write_x11_config(){
|
|||
local X11_MODEL="pc105"
|
||||
local X11_VARIANT=""
|
||||
local X11_OPTIONS="terminate:ctrl_alt_bksp"
|
||||
# find_legacy_keymap
|
||||
find_legacy_keymap
|
||||
|
||||
# layout not found, use KBLAYOUT
|
||||
if [[ -z "$X11_LAYOUT" ]]; then
|
||||
|
@ -362,6 +362,23 @@ configure_alsa(){
|
|||
$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
|
||||
|
||||
configure_machine_id(){
|
||||
|
|
|
@ -41,24 +41,23 @@ echo "depmod extramodules" >> /tmp/livecd.log
|
|||
# depmod extramodules
|
||||
depmod $(cat /usr/lib/modules/$(uname -r)/extramodules/version)
|
||||
|
||||
# check if we are running inside a virtual machine and unistall kalu
|
||||
DESTDIR="/"
|
||||
[[ -e "/usr/bin/kalu" ]] && _rm_kalu
|
||||
|
||||
install_localization
|
||||
|
||||
configure_displaymanager
|
||||
|
||||
echo "configure root password" >> /tmp/livecd.log
|
||||
|
||||
configure_user_root "${DESTDIR}"
|
||||
configure_user_root "/"
|
||||
cp -a /etc/skel/. /root/
|
||||
|
||||
# configure documentation
|
||||
[[ -e "/etc/skel/Manjaro/Beginner_User_Guide.pdf" ]] && ln -sf \
|
||||
/etc/skel/Manjaro/Beginner_User_Guide.pdf "/home/${username}/Desktop/Beginner User Guide.pdf"
|
||||
|
||||
configure_alsa "${DESTDIR}"
|
||||
configure_alsa "/"
|
||||
|
||||
# save settings
|
||||
alsactl -f /etc/asound.state store &>/dev/null
|
||||
|
||||
# check if we are running inside a virtual machine and unistall kalu
|
||||
[[ -e "/usr/bin/kalu" ]] && rm_kalu "/"
|
||||
|
|
Loading…
Reference in a new issue