Commit 32de5cf4 authored by Jondy Zhao's avatar Jondy Zhao

No convert ipv4 netmask in ip addr command

parent c8b6d07b
...@@ -541,7 +541,7 @@ if [[ $object == "link" ]] ; then ...@@ -541,7 +541,7 @@ if [[ $object == "link" ]] ; then
elif [[ $object == "addr" ]] ; then elif [[ $object == "addr" ]] ; then
if [[ $command == "add" ]] || [[ $command == "del" ]] ; then if [[ $command == "add" ]] || [[ $command == "del" ]] ; then
mask=$(prefix_to_netmask $(basename $1)) mask=$(basename $1)
address=$(dirname $1) address=$(dirname $1)
if [[ "$opt_family" == "" ]] ; then if [[ "$opt_family" == "" ]] ; then
if [[ "$address" == *:* ]] ; then if [[ "$address" == *:* ]] ; then
...@@ -562,6 +562,9 @@ elif [[ $object == "addr" ]] ; then ...@@ -562,6 +562,9 @@ elif [[ $object == "addr" ]] ; then
if [[ "$opt_family" == "ipv4" || "$opt_family" == "" ]] ; then if [[ "$opt_family" == "ipv4" || "$opt_family" == "" ]] ; then
ipcmd="netsh interface ip $command address" ipcmd="netsh interface ip $command address"
if [[ ! "$mask" == *.* ]] ; then
mask=$(prefix_to_netmask $mask)
fi
address="$address $mask" address="$address $mask"
elif [[ "$opt_family" == "ipv6" ]] ; then elif [[ "$opt_family" == "ipv6" ]] ; then
ipcmd="netsh interface ipv6 $command address" ipcmd="netsh interface ipv6 $command address"
......
...@@ -79,7 +79,7 @@ Name: "{group}\Configure Node"; Filename: "{app}\cygwin\bin\bash.exe"; Parameter ...@@ -79,7 +79,7 @@ Name: "{group}\Configure Node"; Filename: "{app}\cygwin\bin\bash.exe"; Parameter
Name: "{group}\Command Console"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /opt/slapos/bin/slapconsole /etc/opt/slapos/slapos.cfg"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\terminal.ico"; Name: "{group}\Command Console"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /opt/slapos/bin/slapconsole /etc/opt/slapos/slapos.cfg"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\terminal.ico";
Name: "{group}\Update Center"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/build-slapos.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\updater.ico"; Name: "{group}\Update Center"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/build-slapos.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\updater.ico";
Name: "{group}\User Guide"; Filename: "{app}\user-guide.html"; Name: "{group}\User Guide"; Filename: "{app}\user-guide.html";
Name: "{group}\Read Me"; Filename: "{app}\readme.txt"; Name: "{group}\Read Me"; Filename: "{app}\Readme.txt";
Name: "{group}\SlapOS.org"; Filename: "http://www.slapos.org/"; Name: "{group}\SlapOS.org"; Filename: "http://www.slapos.org/";
Name: "{group}\Uninstall SlapOS"; Filename: "{uninstallexe}"; Name: "{group}\Uninstall SlapOS"; Filename: "{uninstallexe}";
......
...@@ -72,7 +72,7 @@ Name: "{group}\Configure Node"; Filename: "{app}\cygwin\bin\bash.exe"; Parameter ...@@ -72,7 +72,7 @@ Name: "{group}\Configure Node"; Filename: "{app}\cygwin\bin\bash.exe"; Parameter
Name: "{group}\Command Console"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /opt/slapos/bin/slapconsole /etc/opt/slapos/slapos.cfg"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\terminal.ico"; Name: "{group}\Command Console"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /opt/slapos/bin/slapconsole /etc/opt/slapos/slapos.cfg"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\terminal.ico";
Name: "{group}\Update Center"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/build-slapos.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\updater.ico"; Name: "{group}\Update Center"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/build-slapos.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\cygwin\etc\slapos\images\updater.ico";
Name: "{group}\User Guide"; Filename: "{app}\user-guide.html"; Name: "{group}\User Guide"; Filename: "{app}\user-guide.html";
Name: "{group}\Read Me"; Filename: "{app}\readme.txt"; Name: "{group}\Read Me"; Filename: "{app}\Readme.txt";
Name: "{group}\SlapOS.org"; Filename: "http://www.slapos.org/"; Name: "{group}\SlapOS.org"; Filename: "http://www.slapos.org/";
Name: "{group}\Uninstall SlapOS"; Filename: "{uninstallexe}"; Name: "{group}\Uninstall SlapOS"; Filename: "{uninstallexe}";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment