Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f5d07a597f | ||
![]() |
c48893ded2 | ||
![]() |
781f6de35a | ||
![]() |
6131156806 | ||
![]() |
c9fbed1f2d |
@@ -53,6 +53,10 @@ livetimer=$(get_timer_ms)
|
|||||||
configure_displaymanager
|
configure_displaymanager
|
||||||
echo "Configured displaymanager: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
echo "Configured displaymanager: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||||
|
|
||||||
|
livetimer=$(get_timer_ms)
|
||||||
|
configure_calamares
|
||||||
|
echo "Configured calamares unpack ${unpack} $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||||
|
|
||||||
livetimer=$(get_timer_ms)
|
livetimer=$(get_timer_ms)
|
||||||
configure_user_root /
|
configure_user_root /
|
||||||
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
echo "Configured root user: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||||
|
@@ -12,6 +12,6 @@ depend() {
|
|||||||
start() {
|
start() {
|
||||||
ebegin "Running pacman initialization"
|
ebegin "Running pacman initialization"
|
||||||
/usr/bin/pacman-key --init &> /dev/null
|
/usr/bin/pacman-key --init &> /dev/null
|
||||||
/usr/bin/pacman-key --populate archlinux cromnix &> /dev/null
|
/usr/bin/pacman-key --populate archlinux artix &> /dev/null
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,10 @@ get_tz(){
|
|||||||
echo $(kernel_cmdline tz)
|
echo $(kernel_cmdline tz)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_cal_mode(){
|
||||||
|
echo $(kernel_cmdline unpack)
|
||||||
|
}
|
||||||
|
|
||||||
get_timer_ms(){
|
get_timer_ms(){
|
||||||
echo $(date +%s%3N)
|
echo $(date +%s%3N)
|
||||||
}
|
}
|
||||||
@@ -52,11 +56,11 @@ load_live_config(){
|
|||||||
|
|
||||||
[[ -z ${autologin} ]] && autologin=true
|
[[ -z ${autologin} ]] && autologin=true
|
||||||
|
|
||||||
[[ -z ${username} ]] && username="cromnix"
|
[[ -z ${username} ]] && username="artix"
|
||||||
|
|
||||||
[[ -z ${password} ]] && password="cromnix"
|
[[ -z ${password} ]] && password="artix"
|
||||||
|
|
||||||
[[ -z ${addgroups} ]] && addgroups=""
|
[[ -z ${addgroups} ]] && addgroups="video,power,storage,optical,network,lp,scanner,wheel,users,audio"
|
||||||
|
|
||||||
echo "Loaded ${live_conf}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
echo "Loaded ${live_conf}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||||
|
|
||||||
@@ -75,9 +79,7 @@ is_valid_de(){
|
|||||||
load_desktop_map(){
|
load_desktop_map(){
|
||||||
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g" \
|
local _space="s| ||g" _clean=':a;N;$!ba;s/\n/ /g' _com_rm="s|#.*||g" \
|
||||||
file=${DATADIR}/desktop.map
|
file=${DATADIR}/desktop.map
|
||||||
local desktop_map=$(sed "$_com_rm" "$file" \
|
local desktop_map=$(sed "$_com_rm" "$file" | sed "$_space" sed "$_clean")
|
||||||
| sed "$_space" \
|
|
||||||
| sed "$_clean")
|
|
||||||
echo ${desktop_map}
|
echo ${desktop_map}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,10 +147,6 @@ configure_displaymanager(){
|
|||||||
if ${autologin};then
|
if ${autologin};then
|
||||||
sed -i -e "s/\[daemon\]/\[daemon\]\nAutomaticLogin=${username}\nAutomaticLoginEnable=True/" /etc/gdm/custom.conf
|
sed -i -e "s/\[daemon\]/\[daemon\]\nAutomaticLogin=${username}\nAutomaticLoginEnable=True/" /etc/gdm/custom.conf
|
||||||
fi
|
fi
|
||||||
elif [[ -f /usr/bin/mdm ]];then
|
|
||||||
if $(is_valid_de); then
|
|
||||||
sed -i "s|default.desktop|$default_desktop_file.desktop|g" /etc/mdm/custom.conf
|
|
||||||
fi
|
|
||||||
elif [[ -f /usr/bin/sddm ]];then
|
elif [[ -f /usr/bin/sddm ]];then
|
||||||
if $(is_valid_de); then
|
if $(is_valid_de); then
|
||||||
sed -i -e "s|^Session=.*|Session=$default_desktop_file.desktop|" /etc/sddm.conf
|
sed -i -e "s|^Session=.*|Session=$default_desktop_file.desktop|" /etc/sddm.conf
|
||||||
@@ -269,17 +267,31 @@ configure_language(){
|
|||||||
echo "Configured timezone: ${timezone}" >> "${LOGFILE}"
|
echo "Configured timezone: ${timezone}" >> "${LOGFILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# configure_machine_id(){
|
write_unpack_conf(){
|
||||||
# if [ -e "/etc/machine-id" ] ; then
|
local conf="/etc/calamares/modules/unpackfs.conf"
|
||||||
# # delete existing machine-id
|
echo "---" > "$conf"
|
||||||
# echo "Deleting existing machine-id ..." >> "${LOGFILE}"
|
echo "unpack:" >> "$conf"
|
||||||
# rm /etc/machine-id
|
echo " - source: \"/run/artix/bootmnt/artix/$(uname -m)/rootfs.sfs\"" >> "$conf"
|
||||||
# fi
|
echo " sourcefs: \"squashfs\"" >> "$conf"
|
||||||
# # set unique machine-id
|
echo " destination: \"\"" >> "$conf"
|
||||||
# echo "Setting machine-id ..." >> "${LOGFILE}"
|
echo " - source: \"/run/artix/bootmnt/artix/$(uname -m)/desktopfs.sfs\"" >> "$conf"
|
||||||
# dbus-uuidgen --ensure=/etc/machine-id
|
echo " sourcefs: \"squashfs\"" >> "$conf"
|
||||||
# ln -sf /etc/machine-id /var/lib/dbus/machine-id
|
echo " destination: \"\"" >> "$conf"
|
||||||
# }
|
}
|
||||||
|
|
||||||
|
configure_calamares(){
|
||||||
|
if [[ -f /usr/bin/calamares ]];then
|
||||||
|
unpack=$(get_cal_mode)
|
||||||
|
if [[ "${unpack}" == 'yes' ]];then
|
||||||
|
sed -e "/- netinstall/d" \
|
||||||
|
-e "s|- chrootcfg|- unpackfs|" -i /etc/calamares/settings.conf
|
||||||
|
|
||||||
|
sed -e '$ d' -i /etc/calamares/modules/welcome.conf
|
||||||
|
|
||||||
|
write_unpack_conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
configure_sudoers_d(){
|
configure_sudoers_d(){
|
||||||
echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/g_wheel
|
echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/g_wheel
|
||||||
|
Reference in New Issue
Block a user