跳过导航链接 | |
退出打印视图 | |
在 Oracle Solaris 11.1 中使用反应性网络配置连接系统 Oracle Solaris 11.1 Information Library (简体中文) |
使用 netcfg destroy -a 命令,可从内存和持久性存储中删除所有的或指定的用户定义的配置文件。
注 - 无法删除系统定义的配置文件。系统定义的配置文件包括 Automatic 和 DefaultFixed NCP 以及 NoNet、Automatic 和 DefaultFixed 位置配置文件。
destroy 子命令的语法如下所示:
netcfg destroy [ -a | object-type [ class ] object-name]
有关 netcfg 子命令的信息,请参见netcfg 子命令。
注 - 系统中应始终至少有一个配置文件处于活动状态。务必在使用 destroy -a 命令之前启用 Automatic NCP,以避免在删除用户定义的配置文件时出现正在使用中错误。
示例 3-5 使用 netcfg 命令行模式删除指定用户定义的配置文件
要删除系统中特定的用户定义的配置文件,例如要删除名为 User 的 NCP,请键入以下命令:
$ netcfg destroy ncp User
destroy 子命令还可用于从现有 NCP 删除 NCU。在以下示例中,从用户定义的 NCP 中删除了一个名为 net1 的接口 NCU。
$ netcfg "select ncp User; destroy ncu ip net1"
要确认配置文件已删除,请使用 list 子命令,如下所示:
$ netcfg netcfg> select ncp User netcfg:ncp:User> list ncp:User management-type reactive NCUs: phys net1 netcfg:ncp:User> exit $
示例 3-6 使用 netcfg 交互模式删除特定的用户定义的配置文件
在以下示例中,删除了名为 net2 的 IP NCU。
$ netcfg list NCPs: DefaultFixed Automatic User Locations: Automatic NoNet test test-loc DefaultFixed $ netcfg netcfg> select ncp User netcfg:ncp:User> list ncp:User management-type reactive NCUs: phys net2 ip net2 netcfg:ncp:User> destroy ncu ip net2 Destroyed ncu 'net2' netcfg:ncp:User> list ncp:User management-type reactive NCUs: phys net2 netcfg:ncp:User> end netcfg> exit $