From b9b84619ae7222f63f609e912ba94e17791390dc Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Wed, 12 Jun 2019 17:43:29 +0200 Subject: [PATCH] Add network manager configuration Signed-off-by: Severin Kaderli --- install | 88 +++++++++---------- system/etc/NetworkManager/conf.d/dns.conf | 2 + .../etc/NetworkManager/conf.d/rc-manager.conf | 2 - system/etc/resolvconf.conf | 2 - 4 files changed, 46 insertions(+), 48 deletions(-) create mode 100644 system/etc/NetworkManager/conf.d/dns.conf delete mode 100644 system/etc/NetworkManager/conf.d/rc-manager.conf delete mode 100644 system/etc/resolvconf.conf diff --git a/install b/install index 970d448..2c56373 100755 --- a/install +++ b/install @@ -113,6 +113,7 @@ SYSTEMD_SERVICES=( "NetworkManager" "org.cups.cupsd" "suspend" + "systemd-resolved" "xboxdrv" ) @@ -154,51 +155,51 @@ fi ############################################################################### # Install package manager and packages # ############################################################################### -print_section "Installing package requirements" -sudo pacman -S sudo ccache git base-devel --noconfirm --needed +# print_section "Installing package requirements" +# sudo pacman -S sudo ccache git base-devel --noconfirm --needed -print_section "Installing yay" -is_yay_installed=$(command -v yay) +# print_section "Installing yay" +# is_yay_installed=$(command -v yay) -# Install yay if not already installed -if [ -z "${is_yay_installed}" ]; then - git clone https://aur.archlinux.org/yay.git - ( - cd yay || exit - makepkg -si --noconfirm --skippgpcheck - ) - rm -rf yay -else - print_log "yay is already installed" -fi +# # Install yay if not already installed +# if [ -z "${is_yay_installed}" ]; then +# git clone https://aur.archlinux.org/yay.git +# ( +# cd yay || exit +# makepkg -si --noconfirm --skippgpcheck +# ) +# rm -rf yay +# else +# print_log "yay is already installed" +# fi -print_section "Installing native packages" -# List created using: yay -Qqen > packages.native.list -package_count=$(< "${PACKAGES_DIR}/packages.native.list" wc -l) -print_log "Installing ${package_count} packages" -yay -Syy > /dev/null 2>&1 -yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.native.list" +# print_section "Installing native packages" +# # List created using: yay -Qqen > packages.native.list +# package_count=$(< "${PACKAGES_DIR}/packages.native.list" wc -l) +# print_log "Installing ${package_count} packages" +# yay -Syy > /dev/null 2>&1 +# yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.native.list" -print_section "Installing Rust toolchain and components" -rustup toolchain install beta -rustup default beta -rustup component add "${RUST_COMPONENTS[@]}" -rustup default beta +# print_section "Installing Rust toolchain and components" +# rustup toolchain install beta +# rustup default beta +# rustup component add "${RUST_COMPONENTS[@]}" +# rustup default beta -print_section "Installing AUR packages" -package_count=$(< "${PACKAGES_DIR}/packages.aur.list" wc -l) -# List created using: yay -Qqem > packages.aur.list -print_log "Installing ${package_count} packages" -yay -Syy > /dev/null 2>&1 -yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.aur.list" +# print_section "Installing AUR packages" +# package_count=$(< "${PACKAGES_DIR}/packages.aur.list" wc -l) +# # List created using: yay -Qqem > packages.aur.list +# print_log "Installing ${package_count} packages" +# yay -Syy > /dev/null 2>&1 +# yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.aur.list" -print_section "Installing global npm packages" -print_log "Installing ${#NPM_PACKAGES[@]} packages" -npm i -g "${NPM_PACKAGES[@]}" +# print_section "Installing global npm packages" +# print_log "Installing ${#NPM_PACKAGES[@]} packages" +# npm i -g "${NPM_PACKAGES[@]}" -print_section "Installing global composer packages" -print_log "Installing ${#COMPOSER_PACKAGES[@]} packages" -composer global require "${COMPOSER_PACKAGES[@]}" +# print_section "Installing global composer packages" +# print_log "Installing ${#COMPOSER_PACKAGES[@]} packages" +# composer global require "${COMPOSER_PACKAGES[@]}" ############################################################################### # Creating directories # @@ -298,6 +299,9 @@ do sudo install -m 644 "${file}" "/etc/systemd/system" done +print_log "Create symlink for systemd-resolved" +sudo ln -sf "/run/systemd/resolve/stub-resolv.conf" "/etc/resolv.conf" + ############################################################################### # Enabling systemd services # @@ -353,12 +357,8 @@ sudo install -Dm 644 "${SYSTEM_DIR}/etc/vconsole.conf" "/etc/vconsole.conf" print_log "Copying mkinitcpio.conf to ${YELLOW}/etc/mkinitcpio.conf${RESET}" sudo install -Dm 644 "${SYSTEM_DIR}/etc/mkinitcpio.conf" "/etc/mkinitcpio.conf" -print_log "Copying resolvconf.conf to ${YELLOW}/etc/resolvconf.conf${RESET}" -sudo install -Dm 644 "${SYSTEM_DIR}/etc/resolvconf.conf" "/etc/resolvconf.conf" - -print_log "Copying rc-manager.conf to ${YELLOW}/etc/NetworkManager/conf.d${RESET}" -sudo install -Dm 644 "${SYSTEM_DIR}/etc/NetworkManager/conf.d/rc-manager.conf" "/etc/NetworkManager/conf.d" - +print_log "Copying dns.conf to ${YELLOW}/etc/NetworkManager/conf.d${RESET}" +sudo install -Dm 644 "${SYSTEM_DIR}/etc/NetworkManager/conf.d/dns.conf" "/etc/NetworkManager/conf.d" ############################################################################### diff --git a/system/etc/NetworkManager/conf.d/dns.conf b/system/etc/NetworkManager/conf.d/dns.conf new file mode 100644 index 0000000..94b2aee --- /dev/null +++ b/system/etc/NetworkManager/conf.d/dns.conf @@ -0,0 +1,2 @@ +[main] +dns=systemd-resolved \ No newline at end of file diff --git a/system/etc/NetworkManager/conf.d/rc-manager.conf b/system/etc/NetworkManager/conf.d/rc-manager.conf deleted file mode 100644 index d606175..0000000 --- a/system/etc/NetworkManager/conf.d/rc-manager.conf +++ /dev/null @@ -1,2 +0,0 @@ -[main] -rc-manager=resolvconf \ No newline at end of file diff --git a/system/etc/resolvconf.conf b/system/etc/resolvconf.conf deleted file mode 100644 index 1e99bc0..0000000 --- a/system/etc/resolvconf.conf +++ /dev/null @@ -1,2 +0,0 @@ -resolv_conf=/etc/resolv.conf -name_servers="127.0.0.1 8.8.8.8" \ No newline at end of file