-
Notifications
You must be signed in to change notification settings - Fork 146
A few changes to the Hurd port based on hooks #677
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
base: hurd_test
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,18 @@ | ||
| # SPDX-License-Identifier: BSD-2-Clause | ||
| # Copyright (c) 2026 Roy Marples <roy@marples.name> | ||
|
|
||
| # Configure the Hurd PFINET translator. | ||
| # Configure the Hurd network translator (pfinet or lwip). | ||
| # It always on socket 2. | ||
|
|
||
| case "$(showtrans /servers/socket/2)" in | ||
| /hurd/pfinet" "*) pfinet=true;; | ||
| *) pfinet=false;; | ||
| trans=$(showtrans /servers/socket/2 2>/dev/null) | ||
| [ -z "$trans" ] && trans=$(fsysopts /servers/socket/2 2>/dev/null) | ||
|
|
||
| case "$trans" in | ||
| */pfinet" "*|*/lwip" "*) hurd_net=true;; | ||
| *) hurd_net=false;; | ||
|
Comment on lines
+7
to
+12
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A few changes here:
|
||
| esac | ||
|
|
||
| if $pfinet && $if_configured && [ "$ifxname" != "lo" ] ; then | ||
| if $hurd_net && $if_configured && [ "$ifxname" != "lo" ] ; then | ||
| if $if_up && [ -n "$new_ip_address" ]; then | ||
| flags= | ||
| if [ -n "$new_subnet_mask" ]; then | ||
|
|
@@ -20,7 +23,7 @@ if $pfinet && $if_configured && [ "$ifxname" != "lo" ] ; then | |
| fi | ||
| fsysopts /servers/socket/2 -i "$ifxname" \ | ||
| -a "$new_ip_address" $flags | ||
| elif $if_down; then | ||
| elif $if_down || { [ "$reason" = STOPPED ] && ! $if_persistent; }; then | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my previous patches, which configured lwip/pfinet via ioctls, having |
||
| fsysopts /servers/socket/2 -i "$ifxname" -a 0.0.0.0 | ||
| fi | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -358,6 +358,9 @@ make_env(struct dhcpcd_ctx *ctx, const struct interface *ifp, | |
| if (efprintf(fp, "if_configured=%s", | ||
| ifo->options & DHCPCD_CONFIGURE ? "true" : "false") == -1) | ||
| goto eexit; | ||
| if (efprintf(fp, "if_persistent=%s", | ||
| ifo->options & DHCPCD_PERSISTENT ? "true" : "false") == -1) | ||
| goto eexit; | ||
|
Comment on lines
+361
to
+363
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a new var so the |
||
| if (efprintf(fp, "ifcarrier=%s", | ||
| ifp->carrier == LINK_UNKNOWN ? "unknown" : | ||
| ifp->carrier == LINK_UP ? "up" : | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason this is not added automatically in my local environment. It could be just my box, if it complies for you in the Hurd without it, this is probably not needed.