You are not logged in.

#26 2013-03-25 03:24:12

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Announcing netctl

It seems like you have a more broad use case than myself for sure.  I think if you want to get a for sure answer about whether or not you should be filing bug reports, you should ask on [arch-projects], as jouke does not seem to have posted in this thread beyond the OP.  But the development of netctl seems to primarily take place on that mailing list.

I only ever use a few wireless networks, and typically my machine is sleeping between each connection.  So I have not noticed all these things.  But I am sure that jouke would really appreciate this input, as he has been working very hard on this project.

Maybe first though, you should install the netctl-git package from the AUR and report against that since I am fairly certain there have been commits since the netctl package in testing was put together.

Offline

#27 2013-04-01 12:53:37

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: Announcing netctl

So, I was setting up a machine with a fresh arch install, when I discovered netctl. I've opted to replace netcfg, and now I have a few questions.
I've managed to setup two profiles, one wired, one wireless. Now I have enabled both of them with

netctl enable pfname

I've also enabled via systemctl:

ifplugd.service
netctl-auto@.service
netctl-ifplugd@.service
netctl-sleep.service
also both
netctl@profile.services

I want my system configured in such a way, that when a cable is connected, ifplugd brings up the link, and ideally downs the wireless in case its up.
When no cable is available it should just use the wireless.
Apart from the 'auto-down' for the wireless, things seem to work.
But I'm getting timeout-error messages during/after startup regarding wired and strangely enough also the wireless connection when no cable is plugged. Both wireless and wired connect if cable is present during boot, but I still get the following message:

Timed out waiting for device sys-subsystem-net-devices-multi-user.service
[DEPEND] Dependency failed for Automatic wired/wireless network connection using netctl profiles

I'm sure this is because I've somehow misconfigured this, but I've read the man pages, and to be frank, info is pretty sparse atm.


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#28 2013-04-01 13:03:58

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Announcing netctl

Hello,

how are the hooks supposed to work?
I want to rmmod my wireless module before suspending and modprobe it after resuming.
Should I simply place a bash file with commands in the /etc/netctl/hooks directory?
Till now - with netcfg - I had a root-suspend and root-resume systemd service file as described in the wiki.

Thanks in advance.

PS: the netctl-sleep.service works fine, though it hangs sometimes due to the ath9k_htc module which needs to be unloaded.

Last edited by DonVla (2013-04-01 13:06:36)

Offline

#29 2013-04-05 08:11:45

jefdaj
Member
Registered: 2012-12-05
Posts: 25

Re: Announcing netctl

Here's a python script to convert netcfg profiles. It's not at all complete (just covers the stuff I needed), but could be fancied up with special handling of keys, etc.

#!/usr/bin/python2

from re import sub

ALLCAPS = '[A-Z]{5,}'
QUOTEDP = "='.*'"

def read_file(filename):
  with open(filename, 'rb') as f:
    return f.read()

def save_file(text, filename):
  with open(filename, 'wb') as f:
    f.write(text)

def camelcase(m):
  text = m.group(0)
  return ''.join([text[0].upper()] + [l.lower() for l in text[1:]])

def unquote(m):
  text = m.group(0)
  return ''.join([l for l in text if l is not "'"])

def remove_generic(text):
    lines = text.split('\n')
    conds = \
      [ lambda l: len(l) > 0
      , lambda l: not 'Automatically' in l
      , lambda l: not 'A simple' in l
      ]
    for cond in conds:
        lines = [l for l in lines if cond(l)]
    return '\n'.join(lines)

def convert_profile(filename):
  text = read_file(filename)
  text = sub(ALLCAPS, camelcase, text)
  text = sub(QUOTEDP, unquote, text)
  text = remove_generic(text)
  text = text.strip() + '\n'
  save_file(text, filename)

if __name__ == '__main__':
  from sys import argv
  convert_profile(argv[1])

I call it like this:

for f in $(ls /etc/netctl | grep -v interfaces | grep -v examples | grep -v hooks); do ./convert_profiles.py $f; done

But you could use the glob module instead.

Last edited by jefdaj (2013-04-05 08:12:40)

Offline

#30 2013-04-07 22:42:38

Teho
Member
Registered: 2010-01-30
Posts: 200

Re: Announcing netctl

Out of curiosity; why are the example profiles stored in /etc/netctl/examples instead of somewhere in the /usr, considering that they are not "active" nor meant to be configured by the user?

Offline

#31 2013-04-07 22:54:12

progandy
Member
Registered: 2012-05-17
Posts: 5,251

Re: Announcing netctl

Teho wrote:

Out of curiosity; why are the example profiles stored in /etc/netctl/examples instead of somewhere in the /usr, considering that they are not "active" nor meant to be configured by the user?

maybe the location was chosen based on /etc/skel? Another possible location would be soemthing like /usr/share/doc/netctl/examples/ I think.

Last edited by progandy (2013-04-07 22:54:37)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#32 2013-04-07 23:34:44

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 762

Re: Announcing netctl

Teho wrote:

Out of curiosity; why are the example profiles stored in /etc/netctl/examples instead of somewhere in the /usr, considering that they are not "active" nor meant to be configured by the user?

It may not be standard path, but it's surely more at hand in /etc/netctl/examples than somewhere under /usr/share/...

Offline

#33 2013-04-08 00:44:04

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: Announcing netctl

lahwaacz wrote:
Teho wrote:

Out of curiosity; why are the example profiles stored in /etc/netctl/examples instead of somewhere in the /usr, considering that they are not "active" nor meant to be configured by the user?

It may not be standard path, but it's surely more at hand in /etc/netctl/examples than somewhere under /usr/share/...

'More at hand'? Tab-completion means the difference isn't much...


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#34 2013-04-08 05:52:05

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 762

Re: Announcing netctl

ngoonee wrote:
lahwaacz wrote:
Teho wrote:

Out of curiosity; why are the example profiles stored in /etc/netctl/examples instead of somewhere in the /usr, considering that they are not "active" nor meant to be configured by the user?

It may not be standard path, but it's surely more at hand in /etc/netctl/examples than somewhere under /usr/share/...

'More at hand'? Tab-completion means the difference isn't much...

Even with tab-completion, from /etc/netctl it's *much* quicker to go into ./examples than into /usr/share/doc/netctl/examples, don't you think?

Offline

#35 2013-04-08 10:47:01

Teho
Member
Registered: 2010-01-30
Posts: 200

Re: Announcing netctl

lahwaacz wrote:

Even with tab-completion, from /etc/netctl it's *much* quicker to go into ./examples than into /usr/share/doc/netctl/examples, don't you think?

In practise that hardly makes a difference considering that the file is probably copied over only once or twice in the lifetime of the system.

Offline

#36 2013-04-08 10:53:15

Awebb
Member
Registered: 2010-05-06
Posts: 6,568

Re: Announcing netctl

Examples in /etc? What savagery witchcraft pagan dark rituals are you folks cooking up here? Anything that cannot be parsed by an automation has no place in /etc.

Offline

#37 2013-04-10 15:22:56

felipense
Member
Registered: 2013-04-05
Posts: 62

Re: Announcing netctl

what are the new features?

Offline

#38 2013-04-10 16:10:25

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 212
Website

Re: Announcing netctl

felipense wrote:

what are the new features?

Keep an eye on these, where the magic happens;

https://projects.archlinux.org/netctl.git/
https://github.com/joukewitteveen/netctl

It's all there in the manpages, etcetera.

Offline

#39 2013-04-10 17:27:59

GNA
Member
Registered: 2011-02-15
Posts: 57

Re: Announcing netctl

Can someone help me? This error prevents netctl-auto from starting. When I start it manually it works fine. It might be trying to start too early.

Apr 10 19:22:37 arch network[1797]: Successfully initialized wpa_supplicant
Apr 10 19:22:37 arch network[1797]: ctrl_iface exists and seems to be in use - cannot override it
Apr 10 19:22:37 arch network[1797]: Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Apr 10 19:22:37 arch network[1797]: Failed to initialize control interface '/run/wpa_supplicant'.
Apr 10 19:22:37 arch network[1797]: You may have another wpa_supplicant process already running or the file was
Apr 10 19:22:37 arch network[1797]: left by an unclean termination of wpa_supplicant in which case you will need
Apr 10 19:22:37 arch network[1797]: to manually remove this file before starting wpa_supplicant again.
Apr 10 19:22:38 arch network[1797]: The WPA supplicant did not start for interface 'wlan0'

Offline

#40 2013-04-10 17:38:10

dpriedel
Member
Registered: 2010-12-16
Posts: 19

Re: Announcing netctl

Does netctl support ppp?  netcfg does but I have not found any reference to ppp support for netctl

thanks

dave

Offline

#41 2013-04-10 17:40:04

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Announcing netctl

Well netctl does list ppp as an optional dependency so I would guess yes it does support it.

Offline

#42 2013-04-10 17:45:58

bel3atar
Member
Registered: 2012-07-02
Posts: 26

Re: Announcing netctl

i3status broke

Offline

#43 2013-04-10 19:01:32

dpriedel
Member
Registered: 2010-12-16
Posts: 19

Re: Announcing netctl

anonymous_user wrote:

Well netctl does list ppp as an optional dependency so I would guess yes it does support it.

but that seems only in reference to pppoe.  with netcfg, I can use ppp for a pptp VPN connection.  I would like to do the same with netctl but don't see how to do.

Offline

#44 2013-04-10 19:02:16

ironborn
Member
From: Russia
Registered: 2013-02-06
Posts: 1

Re: Announcing netctl

After migrating to netctl my Wi-Fi connection no longer automatically started at boot. But I can start it manually using command nectl start ironborn-wifi

/etc/netctl/ironborn-wifi

Description='ironborn wireless network'
Interface=wlp3s0
Connection=wireless
Security=wpa

IP=dhcp
IP6=no
TimeoutDHCP=30

ESSID='ironborn Wi-Fi'
Key='password'
TimeoutWPA=30

journalctl log

Apr 10 22:40:12 azazel network[259]: The WPA supplicant did not start for interface 'wlp3s0'
Apr 10 22:40:12 azazel network[259]: Failed to bring the network up for profile 'ironborn-wifi'
Apr 10 22:40:12 azazel systemd[1]: netctl@ironborn\x2dwifi.service: main process exited, code=exited, status=1/FAILURE
Apr 10 22:40:12 azazel systemd[1]: Failed to start ironborn wireless network.
Apr 10 22:40:12 azazel systemd[1]: Unit netctl@ironborn\x2dwifi.service entered failed state
Apr 10 22:40:12 azazel systemd[1]: netctl-auto@wlp3s0.service: control process exited, code=exited status=1
Apr 10 22:40:12 azazel systemd[1]: Failed to start Automatic wireless network connection using netctl profiles.
Apr 10 22:40:12 azazel systemd[1]: Unit netctl-auto@wlp3s0.service entered failed state
Apr 10 22:40:16 azazel network[255]: No connection on interface 'enp2s0'
Apr 10 22:40:16 azazel network[255]: Failed to bring the network up for profile 'ethernet-dhcp'
Apr 10 22:40:16 azazel systemd[1]: netctl@ethernet\x2ddhcp.service: main process exited, code=exited, status=1/FAILURE
Apr 10 22:40:16 azazel systemd[1]: Failed to start A basic dhcp ethernet connection.
Apr 10 22:40:16 azazel systemd[1]: Unit netctl@ethernet\x2ddhcp.service entered failed state
Apr 10 22:40:16 azazel systemd[1]: Starting Network.
Apr 10 22:40:16 azazel systemd[1]: Reached target Network.

Any clues and guidelines how debug it further?

Offline

#45 2013-04-10 19:02:51

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: Announcing netctl

bel3atar wrote:

i3status broke

That 1) is extremely unhelpful for anyone who would like to help you trouble-shoot your problem and 2) appears to be entirely unrelated. Care to open another thread and give a few more details?

All the best,

-HG

Offline

#46 2013-04-10 19:24:44

bel3atar
Member
Registered: 2012-07-02
Posts: 26

Re: Announcing netctl

HalosGhost wrote:
bel3atar wrote:

i3status broke

That 1) is extremely unhelpful for anyone who would like to help you trouble-shoot your problem and 2) appears to be entirely unrelated. Care to open another thread and give a few more details?

All the best,

-HG

i3status used to show the correct nework status (wireless ESSID, signal strength, DHCP state, IP address...) when I was using NetworkManager.
Now everything went 'down'.
I know it's not a netctl problem, but I'd like you help me fix this because I don't know the internals of this...

thanks

Offline

#47 2013-04-10 19:33:55

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: Announcing netctl

bel3atar wrote:

i3status used to show the correct nework status (wireless ESSID, signal strength, DHCP state, IP address...) when I was using NetworkManager.
Now everything went 'down'.
I know it's not a netctl problem, but I'd like you help me fix this because I don't know the internals of this...

thanks

We could probably help you trouble-shoot that, but you should open a new thread for this. Please post as much related info as you can in the new thread.

All the best,

-HG

Offline

#48 2013-04-10 21:29:44

Breakage
Member
From: London
Registered: 2008-02-12
Posts: 198
Website

Re: Announcing netctl

fijit wrote:

2) With netcfg it was possible to list PostUp/PreDown commands in the interface/<interface> file, to e.g. start services when connecting to the network. It seems that netctl does not execute these commands. Is there a way to get the same behaviour without including PostUp/PreDown in every profile file?

Try the "ExecUpPost=" & "ExecDownPre=" commands.

Offline

#49 2013-04-10 21:40:15

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Announcing netctl

My netctl-ifplugd only works once.  Suppose the systemd unit is running, and I plug in my ethernet cable.  The interface is successfully configured.  Then I unplug the cable, and the interface is deconfigured.  But now the systemd unit also STOPS!  So if I plug in the cable again, nothing happens.

Basically, netctl-ifplugd has to be manually restarted every time a cable is unplugged.  This can't possibly be right.

Offline

#50 2013-04-11 03:43:05

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

Re: Announcing netctl

Does netctl support mtu configuration?

Offline

Board footer

Powered by FluxBB