Commit 169846ff authored by udeved's avatar udeved

add mhwd-live-net service to sync kernel param nonfree with cal in net/chrootcfg mode

parent 19f830c0
......@@ -5,7 +5,8 @@ SYSCONFDIR = /etc
BIN = \
bin/manjaro-live \
bin/mhwd-live
bin/mhwd-live \
bin/mhwd-live-net
XBIN = \
bin/desktop-items \
......@@ -29,6 +30,7 @@ RC = \
data/rc/gnupg-mount \
data/rc/manjaro-live \
data/rc/mhwd-live \
data/rc/mhwd-live-net \
data/rc/mirrors-live \
data/rc/mirrors-live-net \
data/rc/pacman-init
......@@ -37,6 +39,7 @@ SD = \
data/sd/manjaro-live.service \
data/sd/mirrors-live.service \
data/sd/mhwd-live.service \
data/sd/mhwd-live-net.service \
data/sd/mirrors-live-net.service
all: $(BIN) $(RC) $(XBIN)
......
#!/bin/sh
[[ -r @libdir@/util-live.sh ]] && source @libdir@/util-live.sh
USENONFREE="$(kernel_cmdline nonfree no)"
MODULES_DIR='/etc/calamares/modules'
echo "Setting MHWD nonfree driver: ${USENONFREE} ..." >> /var/log/mhwd-live-net.log
if [[ "${USENONFREE}" == "yes" ]] || [[ "${USENONFREE}" == "true" ]]; then
sed -e "s|^.*driver:.*|driver: nonfree|" -i "${MODULES_DIR}/mhwdcfg.conf"
else
sed -e "s|^.*driver:.*|driver: free|" -i "${MODULES_DIR}/mhwdcfg.conf"
fi
echo "MHWD DONE" >> /var/log/mhwd-live-net.log
#!/usr/bin/openrc-run
# Copyright 2014 Aaditya Bagga (aaditya_gnulinux@zoho.com)
# Distributed under the terms of the GNU General Public License v2
depend() {
need manjaro-live
before xdm
after pacman-init
}
start() {
ebegin "Running mhwd-live script"
# run the mhwd script
/usr/bin/mhwd-live-net &> /dev/null
eend $?
}
[Unit]
Description=LiveMedia MHWD net Script
Before=systemd-user-sessions.service
[Service]
Type=oneshot
ExecStart=/usr/bin/mhwd-live-net
[Install]
WantedBy=multi-user.target
......@@ -152,7 +152,7 @@ configure_displaymanager(){
# Configure display manager
if [[ -f /usr/bin/lightdm ]];then
groupadd -r autologin
[[ -f /usr/bin/openrc ]] && set_lightdm_ck
[[ -d /run/openrc ]] && set_lightdm_ck
set_lightdm_greeter
if $(is_valid_de); then
sed -i -e "s/^.*user-session=.*/user-session=$default_desktop_file/" /etc/lightdm/lightdm.conf
......@@ -173,7 +173,7 @@ configure_displaymanager(){
sed -i "s|default.desktop|$default_desktop_file.desktop|g" /etc/mdm/custom.conf
fi
elif [[ -f /usr/bin/sddm ]];then
[[ -f /usr/bin/openrc ]] && set_sddm_ck
[[ -d /run/openrc ]] && set_sddm_ck
if $(is_valid_de); then
sed -i -e "s|^Session=.*|Session=$default_desktop_file.desktop|" /etc/sddm.conf
fi
......@@ -279,7 +279,7 @@ configure_language(){
echo "LANG=${LOCALE}.UTF-8" >> /etc/environment
if [[ -f /usr/bin/openrc ]]; then
if [[ -d /run/openrc ]]; then
sed -i "s/keymap=.*/keymap=\"${KEYMAP}\"/" /etc/conf.d/keymaps
fi
echo "KEYMAP=${KEYMAP}" > /etc/vconsole.conf
......@@ -336,7 +336,7 @@ configure_user_root(){
}
configure_pulse(){
if [[ -f /usr/bin/openrc ]]; then
if [[ -d /run/openrc ]]; then
sed -e "s|autospawn = no|autospawn = yes|" -i /etc/pulse/client.conf
fi
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment