Compare commits

...

8 Commits
0.8 ... 0.8.1

Author SHA1 Message Date
udeved
e5211838e8 Merge branch 'devel' of github.com:artix-linux/artools 2018-04-17 21:28:02 +02:00
udeved
441c97730b util-iso: append if runit to iso filename 2018-04-15 03:08:47 +02:00
udeved
8ca984325a util-iso-profiles: make setting DM easy to expand 2018-04-15 02:57:17 +02:00
artoo
3c4fc6e00b Merge pull request #42 from konimex/devel
Add initial runit support
2018-04-15 00:05:10 +02:00
udeved
20a20ee8bb buildiso: set the DM on runit 2018-04-14 22:44:30 +02:00
2aae876d98 Detect the service directory using the correct check.
I was an idiot..
2018-04-14 21:16:24 +07:00
a19379596d Add initial runit support 2018-04-14 21:15:49 +07:00
udeved
af8ab5fd1e buildiso: runit support for servicescfg 2018-04-14 10:37:10 +02:00
5 changed files with 48 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
mkinitcpio-nfs-utils
nbd
>openrc artix-live-openrc
>runit artix-live-runit
squashfs-tools
artix-live-portable-efi
linux-lts-headers

View File

@@ -60,6 +60,19 @@ ntfs-3g
>openrc rsync-openrc
>openrc wpa_supplicant-openrc
>openrc opentmpfiles
>runit runit-artix
>runit acpid-runit
>runit cronie-runit
>runit dbus-runit
>runit dhcpcd-runit
>runit elogind-runit
>runit haveged-runit
>runit lvm2-runit
>runit mdadm-runit
>runit nfs-utils-runit
>runit rsync-runit
>runit wpa_supplicant-runit
>runit opentmpfiles
os-prober
pacman
pciutils

View File

@@ -44,19 +44,24 @@ load_profile(){
[[ -z ${password} ]] && password="artix"
if [[ -z ${addgroups} ]];then
addgroups="video,power,storage,optical,network,lp,scanner,wheel,users,audio"
addgroups="video,power,storage,optical,network,lp,scanner,wheel,users,audio,log"
fi
if [[ -z ${services[@]} ]];then
services=('acpid' 'bluetooth' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
fi
[[ ${displaymanager} != "none" ]] && services+=('xdm')
if [[ ${displaymanager} != "none" ]];then
case "${initsys}" in
'openrc') services+=('xdm') ;;
'runit') services+=("${displaymanager}") ;;
esac
fi
if [[ -z ${services_live[@]} ]];then
services_live=('artix-live' 'pacman-init')
fi
[[ -z ${netgroups_url} ]] && netgroups_url="https://raw.githubusercontent.com/artix-linux/netgroups/master"
return 0

View File

@@ -27,14 +27,15 @@ write_bootloader_conf(){
}
write_servicescfg_conf(){
local conf="$1/servicescfg.conf"
local conf="$1/servicescfg.conf" init="$2"
msg2 "Writing %s ..." "${conf##*/}"
echo '---' > "$conf"
echo "initsys: $init" >> "$conf"
echo '' >> "$conf"
echo 'services:' >> "$conf"
echo ' enabled:' >> "$conf"
for s in ${services[@]};do
echo " - name: $s" >> "$conf"
for svc in ${services[@]};do
echo " - name: $svc" >> "$conf"
echo ' runlevel: default' >> "$conf"
done
}
@@ -88,16 +89,14 @@ write_unpack_conf(){
}
configure_calamares(){
local dest="$1" mods="$1/etc/calamares/modules"
local dest="$1" mods="$1/etc/calamares/modules" init="$2"
if [[ -d $dest/etc/calamares/modules ]];then
info "Configuring [Calamares]"
write_netinstall_conf "$mods"
write_unpack_conf "$mods"
write_users_conf "$mods"
write_initcpio_conf "$mods"
case ${initsys} in
'openrc') write_servicescfg_conf "$mods" ;;
esac
write_servicescfg_conf "$mods" "$init"
write_bootloader_conf "$mods"
info "Done configuring [Calamares]"
fi

View File

@@ -139,6 +139,14 @@ add_svc_rc(){
fi
}
add_svc_runit(){
local mnt="$1" name="$2"
if [[ -d $mnt/etc/runit/sv/$name ]]; then
msg2 "Setting %s ..." "$name"
chroot $mnt ln -s /etc/runit/sv/$name /etc/runit/runsvdir/default &>/dev/null
fi
}
set_xdm(){
if [[ -f $1/etc/conf.d/xdm ]];then
local conf='DISPLAYMANAGER="'${displaymanager}'"'
@@ -173,6 +181,14 @@ configure_services(){
add_svc_rc "$mnt" "$svc" "default"
done
;;
'runit')
for svc in ${services[@]}; do
add_svc_runit "$mnt" "$svc"
done
for svc in ${services_live[@]}; do
add_svc_runit "$mnt" "$svc"
done
;;
esac
info "Done configuring [%s]" "${initsys}"
}
@@ -180,7 +196,7 @@ configure_services(){
configure_system(){
local mnt="$1"
case ${initsys} in
'openrc')
'openrc' | 'runit')
configure_logind "$mnt" "elogind"
;;
esac
@@ -242,7 +258,7 @@ configure_live_image(){
configure_hosts "$fs"
configure_system "$fs"
configure_services "$fs"
configure_calamares "$fs"
configure_calamares "$fs" "${initsys}"
write_live_session_conf "$fs"
msg "Done configuring [livefs]"
}
@@ -388,6 +404,7 @@ gen_iso_fn(){
local vars=() name
vars+=("${iso_name}")
vars+=("${profile}")
[[ ${initsys} == 'runit' ]] && vars+=("${initsys}")
vars+=("${iso_version}")
vars+=("${target_arch}")
for n in ${vars[@]};do