forked from mirrored-repos/manjaro-tools
remove live scripts; moved to a livecd repo
This commit is contained in:
parent
50c1eaf050
commit
97597f304d
6 changed files with 0 additions and 590 deletions
10
Makefile
10
Makefile
|
@ -69,7 +69,6 @@ LIBS_ISO = \
|
|||
lib/util-iso-overlayfs.sh \
|
||||
lib/util-iso-image.sh \
|
||||
lib/util-iso-calamares.sh \
|
||||
lib/util-live.sh \
|
||||
lib/util-iso-boot.sh \
|
||||
lib/util-publish.sh \
|
||||
lib/util-iso-log.sh
|
||||
|
@ -94,11 +93,6 @@ CPIOINST = \
|
|||
initcpio/inst/miso_pxe_http \
|
||||
initcpio/inst/miso_kms
|
||||
|
||||
SCRIPTS = \
|
||||
data/scripts/mhwd-live \
|
||||
data/scripts/livecd \
|
||||
data/scripts/kbd-model-map
|
||||
|
||||
MAN_XML = \
|
||||
buildpkg.xml \
|
||||
buildtree.xml \
|
||||
|
@ -180,9 +174,6 @@ install_iso:
|
|||
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||
install -m0644 ${SHARED_ISO} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
|
||||
install -m0644 ${SCRIPTS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
gzip -c man/buildiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
|
||||
gzip -c man/deployiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/deployiso.1.gz
|
||||
|
@ -213,7 +204,6 @@ uninstall_iso:
|
|||
for f in ${LIBS_ISO}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
|
||||
for f in ${CPIOHOOKS}; do rm -f $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/$$f; done
|
||||
for f in ${CPIOINST}; do rm -f $(DESTDIR)$(PREFIX)/lib/initcpio/install/$$f; done
|
||||
for f in ${SCRIPTS}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts/$$f; done
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/deployiso.1.gz
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/manjaro-tools.conf.5.gz
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
# Copied from systemd-localed
|
||||
# http://cgit.freedesktop.org/systemd/systemd/log/src/locale/kbd-model-map
|
||||
# (originally under LGPLv2.1+, used under the LGPL to GPL conversion clause)
|
||||
# Generated from system-config-keyboard's model list
|
||||
# consolelayout xlayout xmodel xvariant xoptions
|
||||
sg ch pc105 de_nodeadkeys terminate:ctrl_alt_bksp
|
||||
nl nl pc105 - terminate:ctrl_alt_bksp
|
||||
mk-utf mk,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
trq tr pc105 - terminate:ctrl_alt_bksp
|
||||
uk gb pc105 - terminate:ctrl_alt_bksp
|
||||
is-latin1 is pc105 - terminate:ctrl_alt_bksp
|
||||
de de pc105 - terminate:ctrl_alt_bksp
|
||||
la-latin1 latam pc105 - terminate:ctrl_alt_bksp
|
||||
us us pc105+inet - terminate:ctrl_alt_bksp
|
||||
ko kr pc105 - terminate:ctrl_alt_bksp
|
||||
ro-std ro pc105 std terminate:ctrl_alt_bksp
|
||||
de-latin1 de pc105 - terminate:ctrl_alt_bksp
|
||||
slovene si pc105 - terminate:ctrl_alt_bksp
|
||||
hu101 hu pc105 qwerty terminate:ctrl_alt_bksp
|
||||
jp106 jp jp106 - terminate:ctrl_alt_bksp
|
||||
croat hr pc105 - terminate:ctrl_alt_bksp
|
||||
it2 it pc105 - terminate:ctrl_alt_bksp
|
||||
hu hu pc105 - terminate:ctrl_alt_bksp
|
||||
sr-latin rs pc105 latin terminate:ctrl_alt_bksp
|
||||
fi fi pc105 - terminate:ctrl_alt_bksp
|
||||
fr_CH ch pc105 fr terminate:ctrl_alt_bksp
|
||||
dk-latin1 dk pc105 - terminate:ctrl_alt_bksp
|
||||
fr fr pc105 - terminate:ctrl_alt_bksp
|
||||
it it pc105 - terminate:ctrl_alt_bksp
|
||||
ua-utf ua,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
fr-latin1 fr pc105 - terminate:ctrl_alt_bksp
|
||||
sg-latin1 ch pc105 de_nodeadkeys terminate:ctrl_alt_bksp
|
||||
be-latin1 be pc105 - terminate:ctrl_alt_bksp
|
||||
dk dk pc105 - terminate:ctrl_alt_bksp
|
||||
fr-pc fr pc105 - terminate:ctrl_alt_bksp
|
||||
bg_pho-utf8 bg,us pc105 ,phonetic terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
it-ibm it pc105 - terminate:ctrl_alt_bksp
|
||||
cz-us-qwertz cz,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
br-abnt2 br abnt2 - terminate:ctrl_alt_bksp
|
||||
ro ro pc105 - terminate:ctrl_alt_bksp
|
||||
us-acentos us pc105 intl terminate:ctrl_alt_bksp
|
||||
pt-latin1 pt pc105 - terminate:ctrl_alt_bksp
|
||||
ro-std-cedilla ro pc105 std_cedilla terminate:ctrl_alt_bksp
|
||||
tj_alt-UTF8 tj pc105 - terminate:ctrl_alt_bksp
|
||||
de-latin1-nodeadkeys de pc105 nodeadkeys terminate:ctrl_alt_bksp
|
||||
no no pc105 - terminate:ctrl_alt_bksp
|
||||
bg_bds-utf8 bg,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
dvorak us pc105 dvorak terminate:ctrl_alt_bksp
|
||||
dvorak us pc105 dvorak-alt-intl terminate:ctrl_alt_bksp
|
||||
ru ru,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
cz-lat2 cz pc105 qwerty terminate:ctrl_alt_bksp
|
||||
pl2 pl pc105 - terminate:ctrl_alt_bksp
|
||||
es es pc105 - terminate:ctrl_alt_bksp
|
||||
ro-cedilla ro pc105 cedilla terminate:ctrl_alt_bksp
|
||||
ie ie pc105 - terminate:ctrl_alt_bksp
|
||||
et ee pc105 - terminate:ctrl_alt_bksp
|
||||
sk-qwerty sk pc105 - terminate:ctrl_alt_bksp,qwerty
|
||||
fr-latin9 fr pc105 latin9 terminate:ctrl_alt_bksp
|
||||
fr_CH-latin1 ch pc105 fr terminate:ctrl_alt_bksp
|
||||
cf ca pc105 - terminate:ctrl_alt_bksp
|
||||
sv-latin1 se pc105 - terminate:ctrl_alt_bksp
|
||||
sr-cy rs pc105 - terminate:ctrl_alt_bksp
|
||||
gr gr,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
by by,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
il il pc105 - terminate:ctrl_alt_bksp
|
||||
kazakh kz,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
|
||||
lt lt pc105 - terminate:ctrl_alt_bksp
|
|
@ -1,58 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
livetimer=$(date +%s%3N)
|
||||
[[ -r /opt/live/util.sh ]] && source /opt/live/util.sh
|
||||
|
||||
load_profile_config "/opt/live/profile.conf"
|
||||
|
||||
[[ -r /opt/live/util-live.sh ]] && source /opt/live/util-live.sh
|
||||
echo "Loaded scripts: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
CONSOLEFONT="$(kernel_cmdline vconsole.font)"
|
||||
CONSOLEMAP="$(kernel_cmdline vconsole.font.map)"
|
||||
arch=$(uname -m)
|
||||
echo "Got consolefont and arch: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
# Activate swap
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_swap
|
||||
echo "Activated swap and added to fstab: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_language
|
||||
echo "Languaged configured: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
locale-gen
|
||||
echo "Ran locale-gen: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
configure_clock
|
||||
|
||||
# Add BROWSER var in env and workaround for mate-terminal
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_env
|
||||
echo "Configured env: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_machine_id
|
||||
echo "Configured machine-id: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_sudo
|
||||
echo "Configured sudoers: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
${autologin} && configure_displaymanager_autologin
|
||||
echo "Configured displaymanager autologin: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_user_root /
|
||||
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
||||
livetimer=$(get_timer_ms)
|
||||
configure_alsa /
|
||||
# Save settings
|
||||
alsactl -f /etc/asound.state store &>/dev/null
|
||||
echo "Configured alsa: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
[[ -r /opt/live/util.sh ]] && source /opt/live/util.sh
|
||||
[[ -r /opt/live/util-live.sh ]] && source /opt/live/util-live.sh
|
||||
|
||||
USENONFREE="$(kernel_cmdline nonfree 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"
|
||||
while [ -e "/var/lib/pacman/db.lck" ];
|
||||
do
|
||||
echo 'Pacman is not ready yet. Will try again in 10 seconds.' >> /var/log/mhwd-live.log
|
||||
echo '----' >> /var/log/mhwd-live.log
|
||||
ps -ef >> /var/log/mhwd-live.log
|
||||
echo '----' >> /var/log/mhwd-live.log
|
||||
seconds=$(($seconds + 10))
|
||||
sleep 10
|
||||
if [[ "$seconds" == "30" ]]; then
|
||||
echo 'Warning: removing pacman db.lck!' >> /var/log/mhwd-live.log
|
||||
rm /var/lib/pacman/db.lck
|
||||
fi
|
||||
done
|
||||
|
||||
# hwdetect_graphics
|
||||
if [[ -e "/opt/live/pacman-gfx.conf" ]]; then
|
||||
echo "Running MHWD..." >> /var/log/mhwd-live.log
|
||||
if [[ "${USENONFREE}" == "yes" ]] || [[ "${USENONFREE}" == "true" ]]; then
|
||||
if [[ "${VIDEO}" == "vesa" ]]; then
|
||||
mhwd --install pci video-vesa --pmconfig "/opt/live/pacman-gfx.conf" >> /var/log/mhwd-live.log
|
||||
else
|
||||
mhwd --auto pci nonfree 0300 --pmconfig "/opt/live/pacman-gfx.conf" >> /var/log/mhwd-live.log
|
||||
fi
|
||||
else
|
||||
if [[ "${VIDEO}" == "vesa" ]]; then
|
||||
mhwd --install pci video-vesa --pmconfig "/opt/live/pacman-gfx.conf" >> /var/log/mhwd-live.log
|
||||
else
|
||||
mhwd --auto pci free 0300 --pmconfig "/opt/live/pacman-gfx.conf" >> /var/log/mhwd-live.log
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "MHWD DONE" >> /var/log/mhwd-live.log
|
|
@ -39,10 +39,6 @@ write_profile_conf_entries(){
|
|||
copy_livecd_helpers(){
|
||||
msg2 "Copying livecd helpers ..."
|
||||
[[ ! -d $1 ]] && mkdir -p $1
|
||||
cp ${LIBDIR}/util-live.sh $1
|
||||
cp ${LIBDIR}/util-msg.sh $1
|
||||
cp ${LIBDIR}/util.sh $1
|
||||
cp ${DATADIR}/scripts/kbd-model-map $1
|
||||
|
||||
cp ${profile_conf} $1
|
||||
|
||||
|
|
406
lib/util-live.sh
406
lib/util-live.sh
|
@ -1,406 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# this util-live.sh gets copied to live-image
|
||||
|
||||
kernel_cmdline(){
|
||||
for param in $(/bin/cat /proc/cmdline); do
|
||||
case "${param}" in
|
||||
$1=*) echo "${param##*=}"; return 0 ;;
|
||||
$1) return 0 ;;
|
||||
*) continue ;;
|
||||
esac
|
||||
done
|
||||
[ -n "${2}" ] && echo "${2}"
|
||||
return 1
|
||||
}
|
||||
|
||||
get_country(){
|
||||
echo $(kernel_cmdline lang)
|
||||
}
|
||||
|
||||
get_keyboard(){
|
||||
echo $(kernel_cmdline keytable)
|
||||
}
|
||||
|
||||
get_layout(){
|
||||
echo $(kernel_cmdline layout)
|
||||
}
|
||||
|
||||
find_legacy_keymap(){
|
||||
file="/opt/live/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
|
||||
# in isolinux if you select a keyboard layout and a language that doesnt match this layout,
|
||||
# it will provide the correct keymap, but not kblayout value
|
||||
local X11_LAYOUT=
|
||||
local X11_MODEL="pc105"
|
||||
local X11_VARIANT=""
|
||||
local X11_OPTIONS="terminate:ctrl_alt_bksp"
|
||||
|
||||
find_legacy_keymap
|
||||
|
||||
# layout not found, use KBLAYOUT
|
||||
if [[ -z "$X11_LAYOUT" ]]; then
|
||||
X11_LAYOUT="$KBLAYOUT"
|
||||
fi
|
||||
|
||||
# create X11 keyboard layout config
|
||||
mkdir -p "$1/etc/X11/xorg.conf.d"
|
||||
|
||||
local XORGKBLAYOUT="$1/etc/X11/xorg.conf.d/00-keyboard.conf"
|
||||
|
||||
echo "" >> "$XORGKBLAYOUT"
|
||||
echo "Section \"InputClass\"" > "$XORGKBLAYOUT"
|
||||
echo " Identifier \"system-keyboard\"" >> "$XORGKBLAYOUT"
|
||||
echo " MatchIsKeyboard \"on\"" >> "$XORGKBLAYOUT"
|
||||
echo " Option \"XkbLayout\" \"$X11_LAYOUT\"" >> "$XORGKBLAYOUT"
|
||||
echo " Option \"XkbModel\" \"$X11_MODEL\"" >> "$XORGKBLAYOUT"
|
||||
echo " Option \"XkbVariant\" \"$X11_VARIANT\"" >> "$XORGKBLAYOUT"
|
||||
echo " Option \"XkbOptions\" \"$X11_OPTIONS\"" >> "$XORGKBLAYOUT"
|
||||
echo "EndSection" >> "$XORGKBLAYOUT"
|
||||
|
||||
}
|
||||
|
||||
configure_language(){
|
||||
# hack to be able to set the locale on bootup
|
||||
local LOCALE=$(get_country)
|
||||
local KEYMAP=$(get_keyboard)
|
||||
local KBLAYOUT=$(get_layout)
|
||||
|
||||
# this is needed for efi, it doesn't set any cmdline
|
||||
[[ -z "$LOCALE" ]] && LOCALE="en_US"
|
||||
[[ -z "$KEYMAP" ]] && KEYMAP="us"
|
||||
[[ -z "$KBLAYOUT" ]] && KBLAYOUT="us"
|
||||
|
||||
local TLANG=${LOCALE%.*}
|
||||
|
||||
sed -i -r "s/#(${TLANG}.*UTF-8)/\1/g" $1/etc/locale.gen
|
||||
|
||||
echo "LANG=${LOCALE}.UTF-8" >> $1/etc/environment
|
||||
|
||||
if [[ -f $1/usr/bin/openrc ]]; then
|
||||
sed -i "s/keymap=.*/keymap=\"${KEYMAP}\"/" $1/etc/conf.d/keymaps
|
||||
fi
|
||||
echo "KEYMAP=${KEYMAP}" > $1/etc/vconsole.conf
|
||||
echo "LANG=${LOCALE}.UTF-8" > $1/etc/locale.conf
|
||||
|
||||
write_x11_config $1
|
||||
|
||||
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(){
|
||||
# Determind which language we are using
|
||||
local LNG_INST=$(cat $1/etc/locale.conf | grep LANG= | cut -d= -f2 | cut -d. -f1)
|
||||
[ -n "$LNG_INST" ] || LNG_INST="en"
|
||||
case "$LNG_INST" in
|
||||
be_BY)
|
||||
#Belarusian
|
||||
FIREFOX_LNG_INST="firefox-i18n-be"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-be"
|
||||
LIBRE_LNG_INST="libreoffice-be"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST=""
|
||||
;;
|
||||
bg_BG)
|
||||
#Bulgarian
|
||||
FIREFOX_LNG_INST="firefox-i18n-bg"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-bg"
|
||||
LIBRE_LNG_INST="libreoffice-bg"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST="kde-l10n-bg"
|
||||
;;
|
||||
de*)
|
||||
#German
|
||||
FIREFOX_LNG_INST="firefox-i18n-de"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-de"
|
||||
LIBRE_LNG_INST="libreoffice-de"
|
||||
HUNSPELL_LNG_INST="hunspell-de"
|
||||
KDE_LNG_INST="kde-l10n-de"
|
||||
;;
|
||||
en*)
|
||||
#English (disabled libreoffice-en-US)
|
||||
FIREFOX_LNG_INST=""
|
||||
THUNDER_LNG_INST=""
|
||||
LIBRE_LNG_INST=""
|
||||
HUNSPELL_LNG_INST="hunspell-en"
|
||||
KDE_LNG_INST=""
|
||||
;;
|
||||
en_GB)
|
||||
#British English
|
||||
FIREFOX_LNG_INST="firefox-i18n-en-gb"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-en-gb"
|
||||
LIBRE_LNG_INST="libreoffice-en-GB"
|
||||
HUNSPELL_LNG_INST="hunspell-en"
|
||||
KDE_LNG_INST=""
|
||||
;;
|
||||
es*)
|
||||
#Espanol
|
||||
FIREFOX_LNG_INST="firefox-i18n-es-es"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-es-es"
|
||||
LIBRE_LNG_INST="libreoffice-es"
|
||||
HUNSPELL_LNG_INST="hunspell-es"
|
||||
KDE_LNG_INST="kde-l10n-es"
|
||||
;;
|
||||
es_AR)
|
||||
#Espanol (Argentina)
|
||||
FIREFOX_LNG_INST="firefox-i18n-es-ar"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-es-ar"
|
||||
LIBRE_LNG_INST="libreoffice-es"
|
||||
HUNSPELL_LNG_INST="hunspell-es"
|
||||
KDE_LNG_INST="kde-l10n-es"
|
||||
;;
|
||||
fr*)
|
||||
#Francais
|
||||
FIREFOX_LNG_INST="firefox-i18n-fr"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-fr"
|
||||
LIBRE_LNG_INST="libreoffice-fr"
|
||||
HUNSPELL_LNG_INST="hunspell-fr"
|
||||
KDE_LNG_INST="kde-l10n-fr"
|
||||
;;
|
||||
it*)
|
||||
#Italian
|
||||
FIREFOX_LNG_INST="firefox-i18n-it"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-it"
|
||||
LIBRE_LNG_INST="libreoffice-it"
|
||||
HUNSPELL_LNG_INST="hunspell-it"
|
||||
KDE_LNG_INST="kde-l10n-it"
|
||||
;;
|
||||
pl_PL)
|
||||
#Polish
|
||||
FIREFOX_LNG_INST="firefox-i18n-pl"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-pl"
|
||||
LIBRE_LNG_INST="libreoffice-pl"
|
||||
HUNSPELL_LNG_INST="hunspell-pl"
|
||||
KDE_LNG_INST="kde-l10n-pl"
|
||||
;;
|
||||
pt_BR)
|
||||
#Brazilian Portuguese
|
||||
FIREFOX_LNG_INST="firefox-i18n-pt-br"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-pt-br"
|
||||
LIBRE_LNG_INST="libreoffice-pt-BR"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST="kde-l10n-pt_br"
|
||||
;;
|
||||
pt_PT)
|
||||
#Portuguese
|
||||
FIREFOX_LNG_INST="firefox-i18n-pt-pt"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-pt-pt"
|
||||
LIBRE_LNG_INST="libreoffice-pt"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST="kde-l10n-pt"
|
||||
;;
|
||||
ro_RO)
|
||||
#Romanian
|
||||
FIREFOX_LNG_INST="firefox-i18n-ro"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-ro"
|
||||
LIBRE_LNG_INST="libreoffice-ro"
|
||||
HUNSPELL_LNG_INST="hunspell-ro"
|
||||
KDE_LNG_INST="kde-l10n-ro"
|
||||
;;
|
||||
ru*)
|
||||
#Russian
|
||||
FIREFOX_LNG_INST="firefox-i18n-ru"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-ru"
|
||||
LIBRE_LNG_INST="libreoffice-ru"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST="kde-l10n-ru"
|
||||
;;
|
||||
sv*)
|
||||
#Swedish
|
||||
FIREFOX_LNG_INST="firefox-i18n-sv-se"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-sv-se"
|
||||
LIBRE_LNG_INST="libreoffice-sv"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST="kde-l10n-sv"
|
||||
;;
|
||||
tr*)
|
||||
#Turkish
|
||||
FIREFOX_LNG_INST="firefox-i18n-tr"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-tr"
|
||||
LIBRE_LNG_INST="libreoffice-tr"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST="kde-l10n-tr"
|
||||
;;
|
||||
uk_UA)
|
||||
#Ukrainian
|
||||
FIREFOX_LNG_INST="firefox-i18n-uk"
|
||||
THUNDER_LNG_INST="thunderbird-i18n-uk"
|
||||
LIBRE_LNG_INST="libreoffice-uk"
|
||||
HUNSPELL_LNG_INST=""
|
||||
KDE_LNG_INST="kde-l10n-uk"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
configure_alsa(){
|
||||
# amixer binary
|
||||
local alsa_amixer="chroot $1 /usr/bin/amixer"
|
||||
|
||||
# enable all known (tm) outputs
|
||||
$alsa_amixer -c 0 sset "Master" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Front" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Side" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Surround" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Center" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "LFE" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Headphone" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Speaker" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "PCM" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Line" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "External" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "FM" 50% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Master Mono" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Master Digital" 70% unmute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Analog Mix" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Aux" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Aux2" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "PCM Center" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "PCM Front" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "PCM LFE" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "PCM Side" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "PCM Surround" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Playback" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "PCM,1" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "DAC" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "DAC,0" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "DAC,0" -12dB &> /dev/null
|
||||
$alsa_amixer -c 0 sset "DAC,1" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "DAC,1" -12dB &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Synth" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "CD" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Wave" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Music" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "AC97" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "Analog Front" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "VIA DXS,0" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "VIA DXS,1" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "VIA DXS,2" 70% unmute &> /dev/null
|
||||
$alsa_amixer -c 0 sset "VIA DXS,3" 70% unmute &> /dev/null
|
||||
|
||||
# set input levels
|
||||
$alsa_amixer -c 0 sset "Mic" 70% mute &>/dev/null
|
||||
$alsa_amixer -c 0 sset "IEC958" 70% mute &>/dev/null
|
||||
|
||||
# special stuff
|
||||
$alsa_amixer -c 0 sset "Master Playback Switch" on &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Master Surround" on &>/dev/null
|
||||
$alsa_amixer -c 0 sset "SB Live Analog/Digital Output Jack" off &>/dev/null
|
||||
$alsa_amixer -c 0 sset "Audigy Analog/Digital Output Jack" off &>/dev/null
|
||||
}
|
||||
|
||||
### end shared functions with cli installer
|
||||
|
||||
configure_machine_id(){
|
||||
if [ -e "/etc/machine-id" ] ; then
|
||||
# delete existing machine-id
|
||||
echo "Deleting existing machine-id ..." >> /var/log/livecd.log
|
||||
rm /etc/machine-id
|
||||
fi
|
||||
# set unique machine-id
|
||||
echo "Setting machine-id ..." >> /var/log/livecd.log
|
||||
dbus-uuidgen --ensure=/etc/machine-id
|
||||
ln -sf /etc/machine-id /var/lib/dbus/machine-id
|
||||
}
|
||||
|
||||
configure_swap(){
|
||||
local swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
|
||||
if [ -e "${swapdev}" ]; then
|
||||
swapon ${swapdev}
|
||||
echo "${swapdev} swap swap defaults 0 0 #configured by manjaro-tools" >>/etc/fstab
|
||||
fi
|
||||
}
|
||||
|
||||
# TODO: review sudoers
|
||||
configure_sudo(){
|
||||
chown root:root /etc/sudoers
|
||||
sed -i -e 's|# %wheel ALL=(ALL) ALL|%wheel ALL=(ALL) ALL|g' /etc/sudoers
|
||||
sed -e 's|# root ALL=(ALL) ALL|root ALL=(ALL) ALL|' -i /etc/sudoers
|
||||
echo "${username} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
chmod 440 /etc/sudoers
|
||||
}
|
||||
|
||||
configure_env(){
|
||||
echo "BROWSER=/usr/bin/xdg-open" >> /etc/environment
|
||||
echo "BROWSER=/usr/bin/xdg-open" >> /etc/skel/.bashrc
|
||||
echo "BROWSER=/usr/bin/xdg-open" >> /etc/profile
|
||||
|
||||
# add TERM var
|
||||
if [ -e "/usr/bin/mate-session" ] ; then
|
||||
echo "TERM=mate-terminal" >> /etc/environment
|
||||
echo "TERM=mate-terminal" >> /etc/profile
|
||||
fi
|
||||
|
||||
## FIXME - Workaround to launch mate-terminal
|
||||
if [ -e "/usr/bin/mate-session" ] ; then
|
||||
sed -i -e "s~^.*Exec=.*~Exec=mate-terminal -e 'sudo setup'~" "/etc/skel/Desktop/installer-launcher-cli.desktop"
|
||||
sed -i -e "s~^.*Terminal=.*~Terminal=false~" "/etc/skel/Desktop/installer-launcher-cli.desktop"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_user_root(){
|
||||
# set up root password
|
||||
echo "root:${password}" | chroot $1 chpasswd
|
||||
cp /etc/skel/.{bash_profile,bashrc,bash_logout} /root/
|
||||
}
|
||||
|
||||
configure_displaymanager_autologin(){
|
||||
if [[ -f /usr/bin/lightdm ]];then
|
||||
gpasswd -a ${username} autologin &> /dev/null
|
||||
sed -i -e "s/^.*autologin-user=.*/autologin-user=${username}/" /etc/lightdm/lightdm.conf
|
||||
sed -i -e "s/^.*autologin-user-timeout=.*/autologin-user-timeout=0/" /etc/lightdm/lightdm.conf
|
||||
sed -i -e "s/^.*pam-autologin-service=.*/pam-autologin-service=lightdm-autologin/" /etc/lightdm/lightdm.conf
|
||||
elif [[ -f /usr/bin/kdm ]];then
|
||||
sed -i -e "s/^.*AutoLoginUser=.*/AutoLoginUser=${username}/" /usr/share/config/kdm/kdmrc
|
||||
sed -i -e "s/^.*AutoLoginPass=.*/AutoLoginPass=${password}/" /usr/share/config/kdm/kdmrc
|
||||
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
|
||||
[[ -e "/usr/bin/update-desktop-database" ]] && update-desktop-database -q
|
||||
elif [[ -f /usr/bin/sddm ]];then
|
||||
sed -i -e "s|^User=.*|User=${username}|" /etc/sddm.conf
|
||||
elif [[ -f /usr/bin/lxdm ]];then
|
||||
sed -i -e "s/^.*autologin=.*/autologin=${username}/" /etc/lxdm/lxdm.conf
|
||||
elif [[ -f /usr/bin/gdm ]];then
|
||||
sed -i -e "s/\[daemon\]/\[daemon\]\nAutomaticLogin=${username}\nAutomaticLoginEnable=True/" /etc/gdm/custom.conf
|
||||
fi
|
||||
}
|
Loading…
Reference in a new issue