Skip to content

FR: Optionally wait for IP addresses#190

Open
mgreter wants to merge 1 commit intoOpenRC:masterfrom
mgreter:feature/wait-for-ip-addr
Open

FR: Optionally wait for IP addresses#190
mgreter wants to merge 1 commit intoOpenRC:masterfrom
mgreter:feature/wait-for-ip-addr

Conversation

@mgreter
Copy link
Copy Markdown
Contributor

@mgreter mgreter commented Dec 9, 2017

I have the need to also wait until dhcp has assigned some ip addresses to the
interfaces before starting my firewall. Not sure if you want to include this, as
it needs the ip command from iproute2 pkg, but I figured I'd create a PR
anyway. Also included the bugfix from my other PR to avoid merge conflicts.

Thanks for consideration!

@williamh
Copy link
Copy Markdown
Contributor

@mgreter Please rebase on master and remove the code for the other pull request. Also, in the future, please avoid putting code from multiple pull requests together.

Thanks,

William

@mgreter mgreter force-pushed the feature/wait-for-ip-addr branch 3 times, most recently from 314e391 to 1c30020 Compare December 12, 2017 10:18
@mgreter
Copy link
Copy Markdown
Contributor Author

mgreter commented Dec 12, 2017

Done, rebased to latest master. And sorry, just kept it in to avoid merge conflicts!

@williamh
Copy link
Copy Markdown
Contributor

@mgreter I like the concept, but I'm wondering if there is a more efficient way to do it that does not use head or grep. Also, you can test for the presence of the ip command with something like:

if [ -n "$(command -v ip)" ]; then
    # Now we know we have the ip command
fi

@mgreter
Copy link
Copy Markdown
Contributor Author

mgreter commented Dec 14, 2017

It might be possible to use a construct like

if [[ $ipaddr == *"inet"* ]]; then

Will hopefully get around to test this upcoming weekend

@mgreter mgreter force-pushed the feature/wait-for-ip-addr branch from 1c30020 to 7d9cf6d Compare January 4, 2018 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants