5 Commits
0.2 ... 0.4.2

Author SHA1 Message Date
udeved
c48893ded2 artix-live: add option to configure calamares with a unpack=yes/no kernel parameter 2017-12-14 20:28:10 +01:00
udeved
781f6de35a rm machine-id config 2017-10-02 09:24:47 +02:00
udeved
6131156806 reactivate machine-id config 2017-10-01 21:59:18 +02:00
udeved
c9fbed1f2d pacman-init: use artix keyring 2017-08-06 21:28:21 +02:00
udeved
0ec222726b remove useless vars and code 2017-07-28 02:42:09 +02:00
4 changed files with 41 additions and 27 deletions

View File

@@ -3,7 +3,7 @@
LIBDIR='@libdir@' LIBDIR='@libdir@'
DATADIR='@datadir@' DATADIR='@datadir@'
SYSCONFDIR='@sysconfdir@' SYSCONFDIR='@sysconfdir@'
LOGFILE='/var/log/cromnix-live.log' LOGFILE='/var/log/artix-live.log'
export LC_MESSAGES=C export LC_MESSAGES=C
export LANG=C export LANG=C
@@ -41,9 +41,9 @@ livetimer=$(get_timer_ms)
configure_sudoers_d configure_sudoers_d
echo "Configured sudoers: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}" echo "Configured sudoers: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms) # livetimer=$(get_timer_ms)
configure_machine_id # configure_machine_id
echo "Configured machine-id: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}" # echo "Configured machine-id: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
livetimer=$(get_timer_ms) livetimer=$(get_timer_ms)
configure_accountsservice "${username}" configure_accountsservice "${username}"
@@ -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}"

View File

@@ -3,21 +3,15 @@
# autologin # autologin
autologin=true autologin=true
# login shell
login_shell=/bin/bash
# live username # live username
username=cromnix username=artix
# live password # live password
password=cromnix 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'
# iso name
iso_name=cromnix
# default_desktop_file # default_desktop_file
default_desktop_file=lxqt default_desktop_file=lxqt

View File

@@ -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 $?
} }

View File

@@ -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)
} }
@@ -58,8 +62,6 @@ load_live_config(){
[[ -z ${addgroups} ]] && addgroups="" [[ -z ${addgroups} ]] && addgroups=""
[[ -z ${login_shell} ]] && login_shell="/bin/bash"
echo "Loaded ${live_conf}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}" echo "Loaded ${live_conf}: $(elapsed_time_ms ${livetimer})ms" >> "${LOGFILE}"
return 0 return 0
@@ -175,9 +177,9 @@ gen_pw(){
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 ${login_shell} ${username} useradd -m -G ${addgroups} -p $(gen_pw) -s /bin/bash ${username}
else else
useradd -m -G ${addgroups} -s ${login_shell} ${username} useradd -m -G ${addgroups} -s /bin/bash ${username}
fi fi
} }
@@ -271,16 +273,30 @@ 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/miso/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/miso/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(){