implement openrc check; needs testing still. close https://github.com/Chrysostomus/manjaro-architect/issues/64

merge-requests/273/head
Bernhard Landauer 8 years ago
parent eb930c83b5
commit 9a425d4811

@ -292,6 +292,10 @@ _DEInfoBody="\nMultiple environments can be installed.\n\nGnome and LXDE come wi
# Install DE Menu
_InstDETitle="Install Desktop Environments"
_InstManDEBody="Please choose a Manjaro Environment.\nNote that the following are currently available for systemd base only:"
_ErrInit="Wrong init system"
_WarnInit="is currently available for systemd only\nPlease adjust your selection:"
_DiffPro="Select different profile"
_InstSystd="Install systemd base"
_InstDEBody="Desktop Environments and their related package groups are listed first."
_ExtraTitle=" Full or minimal? "
_ExtraBody="This edition is offered in two versions"

@ -249,10 +249,10 @@ install_base() {
install_base_menu
fi
if [[ $(cat ${INIT}) -eq 2 ]]; then
touch /tmp/.openrc
touch /mnt/.openrc
cat /usr/share/manjaro-architect/package-lists/base-openrc-manjaro > /tmp/.base
else
[[ -e /tmp/.openrc ]] && rm /tmp/.openrc
[[ -e /mnt/.openrc ]] && rm /mnt/.openrc
cat /usr/share/manjaro-architect/package-lists/base-systemd-manjaro > /tmp/.base
fi
@ -568,8 +568,8 @@ install_cups() {
if [[ $(cat ${PACKAGES} | grep "cups") != "" ]]; then
DIALOG " $_InstNMMenuCups " --yesno "$_InstCupsQ" 0 0
if [[ $? -eq 0 ]]; then
# Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist.
if [[ -e /tmp/.openrc ]]; then
# Add openrc support. If openrcbase was installed, the file /mnt/.openrc should exist.
if [[ -e /mnt/.openrc ]]; then
#statements
arch_chroot "rc-update add cupsd default" 2>$ERR
else

@ -82,7 +82,7 @@ install_manjaro_de_wm() {
# If something has been selected, install
if [[ $(cat /tmp/.desktop) != "" ]]; then
check_for_error "manjaro_de_wm selected: $(cat /tmp/.desktop)"
check_for_error "selected: [Manjaro-$(cat /tmp/.desktop)]"
clear
# Source the iso-profile
profile=$(echo $PROFILES/*/$(cat /tmp/.desktop)/profile.conf)
@ -93,7 +93,8 @@ install_manjaro_de_wm() {
# Parse package list based on user input and remove parts that don't belong to pacman
cat $PROFILES/shared/Packages-Root "$target_desktop" > /tmp/.edition
if [[ -e /tmp/.openrc ]]; then
if [[ -e /mnt/.openrc ]]; then
evaluate_openrc
# Remove any packages tagged with >systemd and remove >openrc tags
sed -i '/>systemd/d' /tmp/.edition
sed -i 's/>openrc //g' /tmp/.edition
@ -193,7 +194,7 @@ install_manjaro_de_wm() {
fi
# Enable services in the chosen profile
echo "Enabling services"
if [[ -e /tmp/.openrc ]]; then
if [[ -e /mnt/.openrc ]]; then
eval $(grep -e "enable_openrc=" $profile | sed 's/# //g')
echo "${enable_openrc[@]}" | xargs -n1 > /tmp/.services
echo /mnt/etc/init.d/* | xargs -n1 | cut -d/ -f5 > /tmp/.available_services
@ -325,7 +326,7 @@ install_manjaro_de_wm_git() {
install_dm() {
# Save repetition of code
enable_dm() {
if [[ -e /tmp/.openrc ]]; then
if [[ -e /mnt/.openrc ]]; then
sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"$(cat ${PACKAGES})\"/g" /mnt/etc/conf.d/xdm
arch_chroot "rc-update add xdm default" 2>$ERR
check_for_error "$FUNCNAME" "$?"
@ -414,15 +415,15 @@ set_sddm_ck() {
install_nm() {
# Save repetition of code
enable_nm() {
# Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist.
# Add openrc support. If openrcbase was installed, the file /mnt/.openrc should exist.
if [[ $(cat ${PACKAGES}) == "NetworkManager" ]]; then
if [[ -e /tmp/.openrc ]]; then
if [[ -e /mnt/.openrc ]]; then
arch_chroot "rc-update add NetworkManager default" 2>$ERR
else
arch_chroot "systemctl enable NetworkManager NetworkManager-dispatcher" >/tmp/.symlink 2>$ERR
fi
else
if [[ -e /tmp/.openrc ]]; then
if [[ -e /mnt/.openrc ]]; then
arch_chroot "rc-update add $(cat ${PACKAGES}) default" 2>$ERR
else
arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>$ERR

@ -47,7 +47,7 @@ main_menu_online() {
*) dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody" 0 0
if [[ $? -eq 0 ]]; then
umount_partitions
[[ -e /tmp/.openrc ]] && rm /tmp/.openrc
[[ -e /mnt/.openrc ]] && rm /mnt/.openrc
clear
exit 0
fi

@ -388,9 +388,10 @@ evaluate_profiles() {
# verify if profile is available for openrc
evaluate_openrc() {
if [[ ! $(grep ">openrc" /tmp/.edition) ]]; then
DIALOG "Wrong init system" --menu "Profile [$(cat /tmp/.desktop)] is currently not ready for openrc\nPlease adjust your selection:" 0 0 2 \
"1" "Select different profile" \
"2" "Install systemd base" 2>${ANSWER}
DIALOG "$_ErrInit" --menu "[Manjaro-$(cat /tmp/.desktop)] $_WarnInit" 0 0 2 \
"1" "$_DiffPro" \
"2" "$_InstSystd" 2>${ANSWER}
check_for_error "selected systemd-only profile [$(cat /tmp/.desktop)] with openrc base. -> $(cat ${ANSWER})" 0
case $(cat ${ANSWER}) in
"1") install_desktop_menu
;;

Loading…
Cancel
Save