update code
This commit is contained in:
commit
a9c1da6924
BIN
icfg-0.9.tbz2
Normal file
BIN
icfg-0.9.tbz2
Normal file
Binary file not shown.
9
icfg-python.patch
Normal file
9
icfg-python.patch
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
diff -up ./src/icfg.orig ./src/icfg
|
||||||
|
--- ./src/icfg.orig 2015-07-17 17:22:04.794083444 -0400
|
||||||
|
+++ ./src/icfg 2015-07-17 17:22:14.282355420 -0400
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/env python
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import string
|
||||||
36
icfg-python3.patch
Normal file
36
icfg-python3.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff -up ./src/icfg.orig ./src/icfg
|
||||||
|
--- ./src/icfg.orig 2018-02-20 10:00:47.738647996 -0500
|
||||||
|
+++ ./src/icfg 2018-02-20 10:07:48.203054651 -0500
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import string
|
||||||
|
@@ -133,7 +133,7 @@ class iface(object):
|
||||||
|
|
||||||
|
def dump(self):
|
||||||
|
for i in self.config.keys():
|
||||||
|
- print i+"="+"\""+self.config[i]+"\""
|
||||||
|
+ print(i,"=","\"",self.config[i],"\"", sep="")
|
||||||
|
|
||||||
|
def removeKey(self, key):
|
||||||
|
try:
|
||||||
|
@@ -299,7 +299,7 @@ def createNewConfig(ifname, iftype):
|
||||||
|
|
||||||
|
def log(msg):
|
||||||
|
if (goptions.quiet == False):
|
||||||
|
- print msg
|
||||||
|
+ print(msg)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
global goptions
|
||||||
|
@@ -427,7 +427,7 @@ def main():
|
||||||
|
if (goptions.listslaves == True):
|
||||||
|
try:
|
||||||
|
for slave in ifdev.slaves:
|
||||||
|
- print slave.name
|
||||||
|
+ print(slave.name)
|
||||||
|
except AttributeError:
|
||||||
|
log("Only bond master devices have slaves")
|
||||||
|
sys.exit(6)
|
||||||
51
icfg.spec
Normal file
51
icfg.spec
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
Name: icfg
|
||||||
|
Version: 0.9
|
||||||
|
Release: 18
|
||||||
|
Summary: A Command line tool used to edit network configuration files
|
||||||
|
License: GPLv2
|
||||||
|
URL: https://fedorahosted.org/icfg
|
||||||
|
Source0: https://fedorahosted.org/releases/i/c/icfg/%{name}-%{version}.tbz2
|
||||||
|
Requires: python3
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Patch0: icfg-python.patch
|
||||||
|
Patch1: icfg-python3.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
Icfg is a command line tool used to handle SysV network interface configuration files.
|
||||||
|
It solved the problems of manual editing during the process of editing network interface
|
||||||
|
configuration files, and creates a scriptable interface which allows administrators to
|
||||||
|
configure (system network interface) during installation without having to roll back
|
||||||
|
using a series of sed and awk commands.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d %{buildroot}/usr/bin
|
||||||
|
install -d %{buildroot}/usr/share/man/man1
|
||||||
|
install -m755 -p src/icfg %{buildroot}/usr/bin/icfg
|
||||||
|
install -m644 -p doc/icfg.1 %{buildroot}/usr/share/man/man1/icfg.1
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%license COPYING
|
||||||
|
%{_bindir}/icfg
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_mandir}/man1/icfg.1.*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Oct 25 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.9-18
|
||||||
|
- Type:bugfix
|
||||||
|
- Id:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:change the directory of the license file
|
||||||
|
|
||||||
|
* Fri Oct 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.9-17
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user