Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install dhcpcd dependencies for GNU/Linux 12 (bookworm) 32-bit #1423

Merged
merged 3 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions installers/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ function _install_dependencies() {
if [ ${OS,,} = "debian" ] || [ ${OS,,} = "ubuntu" ]; then
dhcpcd_package="dhcpcd5"
iw_package="iw"
echo "${dhcpcd_package} and ${iw_package} will be installed from the main deb sources list"
fi

if [ ${OS,,} = "raspbian" ] && [[ ${RELEASE} =~ ^(12) ]]; then
dhcpcd_package="dhcpcd dhcpcd-base"
echo "${dhcpcd_package} will be installed from the main deb sources list"
fi

# Set dconf-set-selections
Expand Down Expand Up @@ -592,6 +598,14 @@ function _default_configuration() {
if [ ! -f "$webroot_dir/includes/config.php" ]; then
sudo cp "$webroot_dir/config/config.php" "$webroot_dir/includes/config.php"
fi

if [ ${OS,,} = "raspbian" ] && [[ ${RELEASE} =~ ^(12) ]]; then
echo "Moving dhcpcd systemd unit control file to /lib/systemd/system/"
sudo mv $webroot_dir/installers/dhcpcd.service /lib/systemd/system/ || _install_status 1 "Unable to move dhcpcd.service file"
sudo systemctl daemon-reload
sudo systemctl enable dhcpcd.service || _install_status 1 "Failed to enable raspap.service"
fi

_install_status 0
fi
}
Expand Down
14 changes: 14 additions & 0 deletions installers/dhcpcd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=DHCP Client Daemon
Wants=network.target
Before=network-online.target
Documentation=man:dhcpcd(8)

[Service]
Type=forking
ExecStart=/usr/sbin/dhcpcd -b -q
Restart=always

[Install]
WantedBy=multi-user.target

Loading