From: znavko--- via <help-guix@gnu.org>
To: "help-guix" <help-guix@gnu.org>
Subject: Herd works with network not at all
Date: Sun, 20 Dec 2020 21:37:41 +0000 [thread overview]
Message-ID: <cc59196e04908a7d07a0010cbc81954b@disroot.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
Hello, Guix! My simple script is just using for reconnect to Internet provider from those 2 I use.
It works bad.
I have internet after PC was booted.
And then I have to use this script to connect to another provider (just for to change IP).
I run my script with `# ./wpa bee` and it does things but I have no Internet and ping does not find host gnu.org
This script stops two services in my system
networking
wpa-supplicant
And then runs them with new wpa-supplicant config.
I placed `sleep 2` there between stopping and running services. But did not get it works fine.
My new config and using of another Internet provider works after reboot.
Also it works without herd just with
# wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
# dhclient -v
I cannot see errors in herd services. Herd services works badly, but hand made connection works fine.
Is the deal over 2 seconds of delay? Do I need to increase delay period?
Please, what do I need to consider?
[-- Attachment #2: wpa --]
[-- Type: application/octet-stream, Size: 794 bytes --]
# cat wpa
#!/bin/sh
usage() {
echo "Usage: $0 provider"
echo "where provider is one of using providers"
exit 1
}
if [ $# -eq 0 ]
then
echo "No arguments supplied"
usage
fi
case "$1" in
"isp")
echo "Connecting to ISP provider"
cp /etc/wpa_supplicant/wpa_isp.conf /etc/wpa_supplicant/wpa_supplicant.conf
herd stop networking
herd stop wpa-supplicant
sleep 2
herd start wpa-supplicant
herd start networking
;;
"bee")
echo "bee"
echo "Connecting to Beeline provider"
cp /etc/wpa_supplicant/wpa_bee.conf /etc/wpa_supplicant/wpa_supplicant.conf
herd stop networking
herd stop wpa-supplicant
sleep 2
herd start wpa-supplicant
herd start networking
;;
*)
echo "Provider is not of cases"
exit 2;
esac
next reply other threads:[~2020-12-20 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-20 21:37 znavko--- via [this message]
2020-12-20 21:51 ` Herd works with network not at all znavko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc59196e04908a7d07a0010cbc81954b@disroot.org \
--to=help-guix@gnu.org \
--cc=znavko@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).