manjaro-tools/scripts/livecd

64 lines
2.2 KiB
Text
Raw Normal View History

2014-12-15 03:50:58 +01:00
#!/bin/sh
2015-09-20 12:40:49 +02:00
livetimer=$(date +%s%3N)
2014-12-15 03:50:58 +01:00
[[ -r /opt/livecd/util.sh ]] && source /opt/livecd/util.sh
load_profile_config "/opt/livecd/profile.conf"
2014-12-15 03:50:58 +01:00
[[ -r /opt/livecd/util-livecd.sh ]] && source /opt/livecd/util-livecd.sh
2015-09-22 22:30:30 +02:00
echo "Loaded scripts: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2014-12-15 03:50:58 +01:00
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
2014-12-15 03:50:58 +01:00
CONSOLEFONT="$(kernel_cmdline vconsole.font)"
CONSOLEMAP="$(kernel_cmdline vconsole.font.map)"
arch=$(uname -m)
2015-09-22 22:30:30 +02:00
echo "Got consolefont and arch: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
# Activate swap
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
2015-02-17 23:51:01 +01:00
configure_swap
2015-09-22 22:30:30 +02:00
echo "Activated swap and added to fstab: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2014-12-15 03:50:58 +01:00
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
2015-02-17 23:51:01 +01:00
configure_language
2015-09-22 22:30:30 +02:00
echo "Languaged configured: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
CURRENT_LOCALE=$(cat $1/etc/locale.conf | grep LANG= | cut -d= -f2 | cut -d. -f1)
# en_US and de_DE are the only locales that are generated in buildiso
if [[ "${CURRENT_LOCALE}" != "en_US" && "${CURRENT_LOCALE}" != "de_DE" ]];then
locale-gen
else
echo "Skipped locale-gen for en_US or de_DE" >> /var/log/livecd.log
fi
2015-09-22 22:30:30 +02:00
echo "Ran locale-gen: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2014-12-15 03:50:58 +01:00
# Add BROWSER var in env and workaround for mate-terminal
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
2015-02-17 23:51:01 +01:00
configure_env
2015-09-22 22:30:30 +02:00
echo "Configured env: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2015-02-17 23:51:01 +01:00
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
2015-02-17 23:51:01 +01:00
configure_machine_id
2015-09-22 22:30:30 +02:00
echo "Configured machine-id: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2014-12-15 03:50:58 +01:00
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
2015-02-17 23:51:01 +01:00
configure_sudo
2015-09-22 22:30:30 +02:00
echo "Configured sudoers: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2014-12-15 03:50:58 +01:00
livetimer=$(get_timer_ms)
${autologin} && configure_displaymanager_autologin
2015-09-22 22:30:30 +02:00
echo "Configured displaymanager autologin: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
2015-09-20 11:31:50 +02:00
configure_user_root /
cp -a /etc/skel/. /root/
2015-09-22 22:30:30 +02:00
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2015-09-20 12:40:49 +02:00
livetimer=$(get_timer_ms)
configure_alsa /
# Save settings
2015-01-11 13:22:45 +01:00
alsactl -f /etc/asound.state store &>/dev/null
2015-09-22 22:30:30 +02:00
echo "Configured alsa: $(elapsed_time_ms ${livetimer})ms" >> /var/log/livecd.log
2015-02-19 13:26:01 +01:00