Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
c24367f987 | |||
0ccfdbfc21 | |||
c30cd6999b | |||
e5b37014d0 | |||
96ae6855ac | |||
22014421b1 | |||
ccebe7ecf3 | |||
7557a84a7d | |||
712774d585 | |||
ef98a333ca | |||
![]() |
7727ce662e | ||
![]() |
b841184cb2 | ||
![]() |
528b3091c6 | ||
![]() |
ffb4f4ba98 | ||
![]() |
64fe174eba |
44
Makefile
44
Makefile
@@ -1,4 +1,4 @@
|
|||||||
VERSION = 0.5
|
VERSION = 0.7
|
||||||
|
|
||||||
PKG = live-services
|
PKG = live-services
|
||||||
TOOLS = artools
|
TOOLS = artools
|
||||||
@@ -33,8 +33,8 @@ RC = \
|
|||||||
data/rc/pacman-init \
|
data/rc/pacman-init \
|
||||||
data/rc/artix-live
|
data/rc/artix-live
|
||||||
|
|
||||||
RUNIT_CORE = \
|
RUNIT_SVD = \
|
||||||
data/runit/89-artix-live.sh
|
data/runit/live
|
||||||
|
|
||||||
RUNIT_SV = \
|
RUNIT_SV = \
|
||||||
data/runit/pacman-init.run
|
data/runit/pacman-init.run
|
||||||
@@ -45,6 +45,10 @@ GRUB_DEFAULT = \
|
|||||||
GRUB_D = \
|
GRUB_D = \
|
||||||
data/99_zzz-portable-efi
|
data/99_zzz-portable-efi
|
||||||
|
|
||||||
|
XDG = $(wildcard data/*.desktop)
|
||||||
|
|
||||||
|
XBIN = bin/desktop-items
|
||||||
|
|
||||||
all: $(BIN) $(RC) $(RUNIT_SV) $(XBIN) $(GRUB_D)
|
all: $(BIN) $(RC) $(RUNIT_SV) $(XBIN) $(GRUB_D)
|
||||||
|
|
||||||
EDIT = sed -e "s|@datadir[@]|$(DATADIR)/$(TOOLS)|g" \
|
EDIT = sed -e "s|@datadir[@]|$(DATADIR)/$(TOOLS)|g" \
|
||||||
@@ -76,9 +80,13 @@ install_rc:
|
|||||||
install $(BMODE) $(RC) $(DESTDIR)$(SYSCONFDIR)/init.d
|
install $(BMODE) $(RC) $(DESTDIR)$(SYSCONFDIR)/init.d
|
||||||
|
|
||||||
install_runit:
|
install_runit:
|
||||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/runit/core-services
|
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/rc/sysinit
|
||||||
|
install $(DMODE) $(DESTDIR)$(LIBDIR)/rc/sv.d
|
||||||
|
|
||||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init
|
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init
|
||||||
install $(BMODE) $(RUNIT_CORE) $(DESTDIR)$(SYSCONFDIR)/runit/core-services
|
install $(BMODE) $(RUNIT_SVD) $(DESTDIR)$(LIBDIR)/rc/sv.d
|
||||||
|
ln -sf $(LIBDIR)/rc/sv.d/live $(DESTDIR)$(SYSCONFDIR)/rc/sysinit/98-live
|
||||||
|
|
||||||
install $(BMODE) $(RUNIT_SV) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init/run
|
install $(BMODE) $(RUNIT_SV) $(DESTDIR)$(SYSCONFDIR)/runit/sv/pacman-init/run
|
||||||
|
|
||||||
install_portable_efi:
|
install_portable_efi:
|
||||||
@@ -88,27 +96,13 @@ install_portable_efi:
|
|||||||
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/grub.d
|
install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/grub.d
|
||||||
install $(BMODE) $(GRUB_D) $(DESTDIR)$(SYSCONFDIR)/grub.d
|
install $(BMODE) $(GRUB_D) $(DESTDIR)$(SYSCONFDIR)/grub.d
|
||||||
|
|
||||||
uninstall_base:
|
install_xdg:
|
||||||
for f in $(notdir $(BIN)); do $(RM) $(DESTDIR)$(BINDIR)/$$f; done
|
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
||||||
for f in $(notdir $(SHARED)); do $(RM) $(DESTDIR)$(DATADIR)/$(TOOLS)/$$f; done
|
install -m0755 ${XBIN} $(DESTDIR)$(PREFIX)/bin
|
||||||
for f in $(notdir $(LIBS)); do $(RM) $(DESTDIR)$(LIBDIR)/$(TOOLS)/$$f; done
|
|
||||||
|
|
||||||
uninstall_portable_efi:
|
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart
|
||||||
for f in $(notdir $(GRUB_DEFAULT)); do $(RM) $(DESTDIR)$(SYSCONFDIR)/default/$$f; done
|
install -m0755 ${XDG} $(DESTDIR)$(SYSCONFDIR)/skel/.config/autostart
|
||||||
for f in $(notdir $(GRUB_D)); do $(RM) $(DESTDIR)$(SYSCONFDIR)/grub.d/$$f; done
|
|
||||||
|
|
||||||
uninstall_rc:
|
install: install_base install_rc install_portable_efi install_xdg
|
||||||
for f in $(notdir $(RC)); do $(RM) $(DESTDIR)$(SYSCONFDIR)/init.d/$$f; done
|
|
||||||
|
|
||||||
uninstall_runit:
|
|
||||||
for f in $(notdir $(RUNIT_SV)); do $(RM) $(DESTDIR)$(SYSCONFDIR)/runit/sv/$$f; done
|
|
||||||
|
|
||||||
install: install_base install_rc install_portable_efi
|
|
||||||
|
|
||||||
uninstall: uninstall_base uninstall_rc uninstall_runit uninstall_portable_efi
|
|
||||||
|
|
||||||
dist:
|
|
||||||
git archive --format=tar --prefix=$(PKG)-$(VERSION)/ $(VERSION) | gzip -9 > $(PKG)-$(VERSION).tar.gz
|
|
||||||
gpg --detach-sign --use-agent $(PKG)-$(VERSION).tar.gz
|
|
||||||
|
|
||||||
.PHONY: all clean install uninstall dist
|
.PHONY: all clean install uninstall dist
|
||||||
|
@@ -16,7 +16,7 @@ load_live_config "${SYSCONFDIR}/live.conf" || load_live_config "${DATADIR}/live.
|
|||||||
|
|
||||||
livetimer=$(get_timer_ms)
|
livetimer=$(get_timer_ms)
|
||||||
detect_desktop_env
|
detect_desktop_env
|
||||||
echo "Detected ${default_desktop_executable} ${default_desktop_file}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
echo "Detected ${DEFAULT_DESKTOP_EXECUTABLE} ${DEFAULT_DESKTOP_FILE}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||||
|
|
||||||
livetimer=$(get_timer_ms)
|
livetimer=$(get_timer_ms)
|
||||||
CONSOLEFONT="$(kernel_cmdline vconsole.font)"
|
CONSOLEFONT="$(kernel_cmdline vconsole.font)"
|
||||||
@@ -35,28 +35,16 @@ echo "Finished localization: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
|||||||
|
|
||||||
livetimer=$(get_timer_ms)
|
livetimer=$(get_timer_ms)
|
||||||
configure_user
|
configure_user
|
||||||
echo "Created user ${username} with password ${password}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
echo "Created user ${USER_NAME} with password ${PASSWORD}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||||
|
|
||||||
livetimer=$(get_timer_ms)
|
livetimer=$(get_timer_ms)
|
||||||
configure_sudoers_d
|
configure_accountsservice "${USER_NAME}"
|
||||||
echo "Configured sudoers: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
|
||||||
|
|
||||||
# livetimer=$(get_timer_ms)
|
|
||||||
# configure_machine_id
|
|
||||||
# echo "Configured machine-id: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
|
||||||
|
|
||||||
livetimer=$(get_timer_ms)
|
|
||||||
configure_accountsservice "${username}"
|
|
||||||
echo "Configured accountsservice: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
echo "Configured accountsservice: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
|
||||||
|
|
||||||
livetimer=$(get_timer_ms)
|
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 netinstall ${netinstall} $(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}"
|
||||||
|
28
bin/desktop-items.in
Normal file
28
bin/desktop-items.in
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
xdg=$(xdg-user-dir DESKTOP)
|
||||||
|
src=/usr/share/applications
|
||||||
|
|
||||||
|
if [[ -f $src/org.kde.konversation.desktop ]]; then
|
||||||
|
install -m644 $src/org.kde.konversation.desktop \
|
||||||
|
$xdg/org.kde.konversation.desktop
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if [[ -f /usr/bin/calamares ]]; then
|
||||||
|
# cp $src/calamares.desktop \
|
||||||
|
# $xdg/calamares.desktop
|
||||||
|
# fi
|
||||||
|
|
||||||
|
docs=/usr/share/doc/artix
|
||||||
|
|
||||||
|
for f in {Configuration,Troubleshooting}.pdf;do
|
||||||
|
ln -s $docs/$f $xdg/$f
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -d /run/openrc ]];then
|
||||||
|
ln -s $docs/OpenRC.pdf $xdg/OpenRC.pdf
|
||||||
|
else
|
||||||
|
ln -s $docs/Runit.pdf $xdg/Runit.pdf
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "live session details: /var/log/artix-live.log" > $xdg/README.txt
|
@@ -1,20 +1,20 @@
|
|||||||
# live session configuration
|
# live session configuration
|
||||||
|
|
||||||
# autologin
|
# autologin
|
||||||
autologin=true
|
AUTOLOGIN=true
|
||||||
|
|
||||||
# live username
|
# live username
|
||||||
username=artix
|
USER_NAME=artix
|
||||||
|
|
||||||
# live password
|
# live password
|
||||||
password=artix
|
PASSWORD=artix
|
||||||
|
|
||||||
# live group membership
|
# live group membership
|
||||||
addgroups='video,power,disk,storage,optical,network,lp,scanner,wheel'
|
ADDGROUPS='video,power,disk,storage,optical,network,lp,scanner,wheel'
|
||||||
|
|
||||||
# default_desktop_file
|
# default desktop file
|
||||||
default_desktop_file=lxqt
|
DEFAULT_DESKTOP_FILE=lxqt
|
||||||
|
|
||||||
# default_desktop_executable
|
# default desktop executable
|
||||||
default_desktop_executable=lxqt-session
|
DEFAULT_DESKTOP_EXECUTABLE=lxqt-session
|
||||||
|
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
msg "Initializing artix-live script"
|
|
||||||
artix-live
|
|
15
data/runit/live
Normal file
15
data/runit/live
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. /usr/lib/rc/functions
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
stat_busy "Initializing artix live system"
|
||||||
|
artix-live #|| stat_die
|
||||||
|
add_daemon live
|
||||||
|
stat_done
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "usage: $0 {start}"
|
||||||
|
;;
|
||||||
|
esac
|
@@ -50,17 +50,17 @@ load_live_config(){
|
|||||||
|
|
||||||
[[ -f $1 ]] || return 1
|
[[ -f $1 ]] || return 1
|
||||||
|
|
||||||
live_conf="$1"
|
local live_conf="$1"
|
||||||
|
|
||||||
[[ -r ${live_conf} ]] && source ${live_conf}
|
[[ -r ${live_conf} ]] && source ${live_conf}
|
||||||
|
|
||||||
[[ -z ${autologin} ]] && autologin=true
|
[[ -z ${AUTOLOGIN} ]] && AUTOLOGIN=true
|
||||||
|
|
||||||
[[ -z ${username} ]] && username="artix"
|
[[ -z ${USER_NAME} ]] && USER_NAME="artix"
|
||||||
|
|
||||||
[[ -z ${password} ]] && password="artix"
|
[[ -z ${PASSWORD} ]] && PASSWORD="artix"
|
||||||
|
|
||||||
[[ -z ${addgroups} ]] && addgroups="video,power,storage,optical,network,lp,scanner,wheel,users,audio"
|
[[ -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}"
|
||||||
|
|
||||||
@@ -68,8 +68,8 @@ load_live_config(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
is_valid_de(){
|
is_valid_de(){
|
||||||
if [[ ${default_desktop_executable} != "none" ]] && \
|
if [[ ${DEFAULT_DESKTOP_EXECUTABLE} != "none" ]] && \
|
||||||
[[ ${default_desktop_file} != "none" ]]; then
|
[[ ${DEFAULT_DESKTOP_FILE} != "none" ]]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
@@ -85,14 +85,14 @@ load_desktop_map(){
|
|||||||
|
|
||||||
detect_desktop_env(){
|
detect_desktop_env(){
|
||||||
local xs=/usr/share/xsessions ex=/usr/bin key val map=( $(load_desktop_map) )
|
local xs=/usr/share/xsessions ex=/usr/bin key val map=( $(load_desktop_map) )
|
||||||
default_desktop_file="none"
|
DEFAULT_DESKTOP_FILE="none"
|
||||||
default_desktop_executable="none"
|
DEFAULT_DESKTOP_EXECUTABLE="none"
|
||||||
for item in "${map[@]}";do
|
for item in "${map[@]}";do
|
||||||
key=${item%:*}
|
key=${item%:*}
|
||||||
val=${item#*:}
|
val=${item#*:}
|
||||||
if [[ -f $xs/$key.desktop ]] && [[ -f $ex/$val ]];then
|
if [[ -f $xs/$key.desktop ]] && [[ -f $ex/$val ]];then
|
||||||
default_desktop_file="$key"
|
DEFAULT_DESKTOP_FILE="$key"
|
||||||
default_desktop_executable="$val"
|
DEFAULT_DESKTOP_EXECUTABLE="$val"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ configure_accountsservice(){
|
|||||||
local path=/var/lib/AccountsService/users
|
local path=/var/lib/AccountsService/users
|
||||||
if [ -d "${path}" ] ; then
|
if [ -d "${path}" ] ; then
|
||||||
echo "[User]" > ${path}/$1
|
echo "[User]" > ${path}/$1
|
||||||
echo "XSession=${default_desktop_file}" >> ${path}/$1
|
echo "XSession=${DEFAULT_DESKTOP_FILE}" >> ${path}/$1
|
||||||
if [[ -f "/var/lib/AccountsService/icons/$1.png" ]];then
|
if [[ -f "/var/lib/AccountsService/icons/$1.png" ]];then
|
||||||
echo "Icon=/var/lib/AccountsService/icons/$1.png" >> ${path}/$1
|
echo "Icon=/var/lib/AccountsService/icons/$1.png" >> ${path}/$1
|
||||||
fi
|
fi
|
||||||
@@ -134,62 +134,62 @@ configure_displaymanager(){
|
|||||||
set_lightdm_vt
|
set_lightdm_vt
|
||||||
set_lightdm_greeter
|
set_lightdm_greeter
|
||||||
if $(is_valid_de); then
|
if $(is_valid_de); then
|
||||||
sed -i -e "s/^.*user-session=.*/user-session=$default_desktop_file/" /etc/lightdm/lightdm.conf
|
sed -i -e "s/^.*user-session=.*/user-session=$DEFAULT_DESKTOP_FILE/" /etc/lightdm/lightdm.conf
|
||||||
fi
|
fi
|
||||||
if ${autologin};then
|
if ${AUTOLOGIN};then
|
||||||
gpasswd -a ${username} autologin &> /dev/null
|
gpasswd -a ${USER_NAME} autologin &> /dev/null
|
||||||
sed -i -e "s/^.*autologin-user=.*/autologin-user=${username}/" /etc/lightdm/lightdm.conf
|
sed -i -e "s/^.*autologin-user=.*/autologin-user=${USER_NAME}/" /etc/lightdm/lightdm.conf
|
||||||
sed -i -e "s/^.*autologin-user-timeout=.*/autologin-user-timeout=0/" /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
|
sed -i -e "s/^.*pam-autologin-service=.*/pam-autologin-service=lightdm-autologin/" /etc/lightdm/lightdm.conf
|
||||||
fi
|
fi
|
||||||
elif [[ -f /usr/bin/gdm ]];then
|
elif [[ -f /usr/bin/gdm ]];then
|
||||||
configure_accountsservice "gdm"
|
configure_accountsservice "gdm"
|
||||||
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=${USER_NAME}\nAutomaticLoginEnable=True/" /etc/gdm/custom.conf
|
||||||
fi
|
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
|
||||||
fi
|
fi
|
||||||
if ${autologin};then
|
if ${AUTOLOGIN};then
|
||||||
sed -i -e "s|^User=.*|User=${username}|" /etc/sddm.conf
|
sed -i -e "s|^User=.*|User=${USER_NAME}|" /etc/sddm.conf
|
||||||
fi
|
fi
|
||||||
elif [[ -f /usr/bin/lxdm ]];then
|
elif [[ -f /usr/bin/lxdm ]];then
|
||||||
if $(is_valid_de); then
|
if $(is_valid_de); then
|
||||||
sed -i -e "s|^.*session=.*|session=/usr/bin/$default_desktop_executable|" /etc/lxdm/lxdm.conf
|
sed -i -e "s|^.*session=.*|session=/usr/bin/${DEFAULT_DESKTOP_EXECUTABLE}|" /etc/lxdm/lxdm.conf
|
||||||
fi
|
fi
|
||||||
if ${autologin};then
|
if ${AUTOLOGIN};then
|
||||||
sed -i -e "s/^.*autologin=.*/autologin=${username}/" /etc/lxdm/lxdm.conf
|
sed -i -e "s/^.*autologin=.*/autologin=${USER_NAME}/" /etc/lxdm/lxdm.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_pw(){
|
gen_pw(){
|
||||||
echo $(perl -e 'print crypt($ARGV[0], "password")' ${password})
|
echo $(perl -e 'print crypt($ARGV[0], "password")' ${PASSWORD})
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_user(){
|
configure_user(){
|
||||||
# set up user and password
|
# set up user and password
|
||||||
if [[ -n ${password} ]];then
|
if [[ -n ${PASSWORD} ]];then
|
||||||
useradd -m -G ${addgroups} -p $(gen_pw) -s /bin/bash ${username}
|
useradd -m -G ${ADDGROUPS} -p $(gen_pw) -s /bin/bash ${USER_NAME}
|
||||||
else
|
else
|
||||||
useradd -m -G ${addgroups} -s /bin/bash ${username}
|
useradd -m -G ${ADDGROUPS} -s /bin/bash ${USER_NAME}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
find_legacy_keymap(){
|
find_legacy_keymap(){
|
||||||
local file="${DATADIR}/kbd-model.map"
|
local file="${DATADIR}/kbd-model.map" kt="$1"
|
||||||
while read -r line || [[ -n $line ]]; do
|
while read -r line || [[ -n $line ]]; do
|
||||||
if [[ -z $line ]] || [[ $line == \#* ]]; then
|
if [[ -z $line ]] || [[ $line == \#* ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mapping=( $line ); # parses columns
|
local mapping=( $line ); # parses columns
|
||||||
if [[ ${#mapping[@]} != 5 ]]; then
|
if [[ ${#mapping[@]} != 5 ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${keytable}" != "${mapping[0]}" ]]; then
|
if [[ "$kt" != "${mapping[0]}" ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -212,12 +212,13 @@ write_x11_config(){
|
|||||||
local X11_MODEL="pc105"
|
local X11_MODEL="pc105"
|
||||||
local X11_VARIANT=""
|
local X11_VARIANT=""
|
||||||
local X11_OPTIONS="terminate:ctrl_alt_bksp"
|
local X11_OPTIONS="terminate:ctrl_alt_bksp"
|
||||||
|
local kt="$1"
|
||||||
|
|
||||||
find_legacy_keymap
|
find_legacy_keymap "$kt"
|
||||||
|
|
||||||
# layout not found, use KBLAYOUT
|
# layout not found, use KBLAYOUT
|
||||||
if [[ -z "$X11_LAYOUT" ]]; then
|
if [[ -z "$X11_LAYOUT" ]]; then
|
||||||
X11_LAYOUT="${keytable}"
|
X11_LAYOUT="$kt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create X11 keyboard layout config
|
# create X11 keyboard layout config
|
||||||
@@ -239,7 +240,7 @@ write_x11_config(){
|
|||||||
configure_language(){
|
configure_language(){
|
||||||
# hack to be able to set the locale on bootup
|
# hack to be able to set the locale on bootup
|
||||||
local lang=$(get_lang)
|
local lang=$(get_lang)
|
||||||
keytable=$(get_keytable)
|
local keytable=$(get_keytable)
|
||||||
local timezone=$(get_tz)
|
local timezone=$(get_tz)
|
||||||
# Fallback
|
# Fallback
|
||||||
# [[ -z "${lang}" ]] && lang="en_US"
|
# [[ -z "${lang}" ]] && lang="en_US"
|
||||||
@@ -257,7 +258,7 @@ configure_language(){
|
|||||||
echo "LANG=${lang}.UTF-8" > /etc/locale.conf
|
echo "LANG=${lang}.UTF-8" > /etc/locale.conf
|
||||||
ln -sf /usr/share/zoneinfo/${timezone} /etc/localtime
|
ln -sf /usr/share/zoneinfo/${timezone} /etc/localtime
|
||||||
|
|
||||||
write_x11_config
|
write_x11_config "${keytable}"
|
||||||
|
|
||||||
loadkeys "${keytable}"
|
loadkeys "${keytable}"
|
||||||
|
|
||||||
@@ -267,23 +268,6 @@ configure_language(){
|
|||||||
echo "Configured timezone: ${timezone}" >> "${LOGFILE}"
|
echo "Configured timezone: ${timezone}" >> "${LOGFILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_calamares(){
|
|
||||||
if [[ -f /usr/bin/calamares ]];then
|
|
||||||
netinstall=$(get_cal_mode)
|
|
||||||
if [[ "${netinstall}" == 'no' ]];then
|
|
||||||
sed -e "/- netinstall/d" \
|
|
||||||
-e "s|- chrootcfg|- unpackfs|" -i /etc/calamares/settings.conf
|
|
||||||
|
|
||||||
sed -e '$ d' -i /etc/calamares/modules/welcome.conf
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
configure_sudoers_d(){
|
|
||||||
echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/g_wheel
|
|
||||||
echo "root ALL=(ALL) ALL" > /etc/sudoers.d/u_root
|
|
||||||
}
|
|
||||||
|
|
||||||
configure_swap(){
|
configure_swap(){
|
||||||
local swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
|
local swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
|
||||||
if [ -e "${swapdev}" ]; then
|
if [ -e "${swapdev}" ]; then
|
||||||
@@ -293,6 +277,6 @@ configure_swap(){
|
|||||||
|
|
||||||
configure_user_root(){
|
configure_user_root(){
|
||||||
# set up root password
|
# set up root password
|
||||||
echo "root:${password}" | chroot $1 chpasswd
|
echo "root:${PASSWORD}" | chroot $1 chpasswd
|
||||||
cp /etc/skel/.{bash_profile,bashrc,bash_logout} /root/
|
cp /etc/skel/.{bash_profile,bashrc,bash_logout} /root/
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user