您尚未登录。

#1 2014-09-02 22:07:05

yearharvest
会员
注册时间: 2013-08-02
帖子: 60

【已解决】关于netctl-auto的问题

配置文件/etc/netctl/wireless,运行netctl list可以看到配置文件,但是运行netctl-auto list却看不到,netctl-auto的配置文件不在/etc/netctl/下吗?

Description='A wireless connection using a custom network block configuration'
Interface=enp0s29f7u1
Connection=wireless
Security=wpa-configsection
IP=dhcp
WPAConfigSection=(
    'ssid="IT"'
    'proto=RSN WPA'
    'key_mgmt=WPA-PSK'
    'group=CCMP TKIP'
    'pairwise=CCMP TKIP'
    'psk=xxxx'
    'priority=1'
)

最近编辑记录 yearharvest (2014-09-03 20:25:15)

离线

#2 2014-09-02 22:10:45

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,491
个人网站

Re: 【已解决】关于netctl-auto的问题

netctl-auto@interface.service 没有启动?

在线

#3 2014-09-02 22:16:12

yearharvest
会员
注册时间: 2013-08-02
帖子: 60

Re: 【已解决】关于netctl-auto的问题

是要先netctl-auto enable wireless一下吧,但是这样的话就会报配置wireless不存在

离线

#4 2014-09-02 22:29:07

mugbya
会员
注册时间: 2013-08-12
帖子: 166

Re: 【已解决】关于netctl-auto的问题

我想我之前是不是你那么做的,有次升级,直接就在联网上出问题了。

现在我都这么做,没出问题

照仙子的步凑 ,先netctl-auto 你的网络接口

下一步就是用 wifi-menu 接口

这会看到很多的SSID ,选一个,连进入,会自动帮你生存配置文件

这样,自动连接就做好了 -

最近编辑记录 mugbya (2014-09-02 22:32:08)


不忘初心,方得始终

离线

#5 2014-09-02 22:32:48

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,491
个人网站

Re: 【已解决】关于netctl-auto的问题

其实我的步骤是,把配置文件扔 /etc/netctl 下之后,enable 以及 start netctl-auto@wlan0.service 服务就可以了~(你的网络接口名字可能和我的不一样。)
参考资料: https://wiki.archlinux.org/index.php/Ne … f_profiles

在线

#6 2014-09-02 22:48:38

yearharvest
会员
注册时间: 2013-08-02
帖子: 60

Re: 【已解决】关于netctl-auto的问题

如果我不用netctl-auto而是运行netctl start wireless的话就可以正常连接网络,所以配置文件应该没问题。但是运行netctl-auto enable wireless之后,却提示Profile 'wireless' does not exist or is not available。

# sudo netctl-auto enable wireless
Profile 'wireless' does not exist or is not available
# sudo netctl-auto start wireless
Use 'systemctl start netctl-auto@wireless' to start netctl-auto.
# sudo systemctl start netctl-auto@wireless
A dependency job for netctl-auto@wireless.service failed. See 'journalctl -xn' for details.
# journalctl -xn
-- Logs begin at 四 2014-08-28 07:55:03 CST, end at 三 2014-09-03 06:52:00 CST. --
9月 03 06:50:17 arch sudo[754]: pam_unix(sudo:session): session opened for user root by year(uid=0)
9月 03 06:50:17 arch sudo[754]: pam_unix(sudo:session): session closed for user root
9月 03 06:50:30 arch sudo[760]: year : TTY=pts/0 ; PWD=/home/year ; USER=root ; COMMAND=/usr/bin/systemctl start netctl-auto@wireless
9月 03 06:50:30 arch sudo[760]: pam_unix(sudo:session): session opened for user root by year(uid=0)
9月 03 06:52:00 arch systemd[1]: Job sys-subsystem-net-devices-wireless.device/start timed out.
9月 03 06:52:00 arch systemd[1]: Timed out waiting for device sys-subsystem-net-devices-wireless.device.
-- Subject: Unit sys-subsystem-net-devices-wireless.device has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sys-subsystem-net-devices-wireless.device has failed.
--
-- The result is timeout.
9月 03 06:52:00 arch systemd[1]: Dependency failed for Automatic wireless network connection using netctl profiles.
-- Subject: Unit netctl-auto@wireless.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit netctl-auto@wireless.service has failed.
--
-- The result is dependency.
9月 03 06:52:00 arch sudo[760]: pam_unix(sudo:session): session closed for user root

离线

#7 2014-09-02 22:54:02

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,491
个人网站

Re: 【已解决】关于netctl-auto的问题

systemctl start netctl-auto@你的网络接口名。ip address 命令可以看到。

在线

#8 2014-09-02 23:19:18

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,491
个人网站

Re: 【已解决】关于netctl-auto的问题

在线

#9 2014-09-02 23:39:09

yearharvest
会员
注册时间: 2013-08-02
帖子: 60

Re: 【已解决】关于netctl-auto的问题

百合仙子 说:

解决了,多谢!

再问一下,两个网络自动切换的话是写两个配置文件吗,还是类似下面这样只写一个配置文件?

Description='A wireless connection using a custom network block configuration'
Interface=enp0s29f7u1
Connection=wireless
Security=wpa-configsection
IP=dhcp
WPAConfigSection=(
    'ssid="IT"'
    'proto=RSN WPA'
    'key_mgmt=WPA-PSK'
    'group=CCMP TKIP'
    'pairwise=CCMP TKIP'
    'psk=xxxx'
    'priority=1'
)
WPAConfigSection=(
    'ssid="IT2"'
    'proto=RSN WPA'
    'key_mgmt=WPA-PSK'
    'group=CCMP TKIP'
    'pairwise=CCMP TKIP'
    'psk=xxxx'
    'priority=1'
)

离线

#10 2014-09-03 14:49:18

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,491
个人网站

Re: 【已解决】关于netctl-auto的问题

写多个配置文件。

在线

#11 2014-09-03 20:24:58

yearharvest
会员
注册时间: 2013-08-02
帖子: 60

Re: 【已解决】关于netctl-auto的问题

知道了,多谢

离线

页脚