Commit a3ca8db5 authored by Jondy Zhao's avatar Jondy Zhao

Change patch file names;

Remove redundant mask in ip addr list command;
parent 72f1822e
...@@ -31,9 +31,10 @@ fi ...@@ -31,9 +31,10 @@ fi
bin/buildout -v -N || (echo "Buildout SlapOS failed."; exit 1) bin/buildout -v -N || (echo "Buildout SlapOS failed."; exit 1)
# apply patches # apply patches
if [[ -f /etc/slapos/patches/slapos-core.patch ]] ; then patch_file=/etc/slapos/patches/slapos-core-format.patch
echo "Apply patch: /etc/slapos/patches/slapos-core.patch" if [[ -f $patch_file ]] ; then
(cd `ls -d $slapos_home/eggs/slapos.core-*-py2.7.egg`/slapos ; \ echo "Apply patch: $patch_file"
patch -p1 < /etc/slapos/patches/slapos-core.patch ) (cd `ls -d $slapos_home/eggs/slapos.core-*-py2.7.egg` ; \
(cd /etc/slapos/patches ; mv slapos-core.patch slapos-core.patch.done) patch -p1 < $patch_file)
(cd /etc/slapos/patches ; mv $patch_file{,.done})
fi fi
...@@ -550,6 +550,10 @@ elif [[ $object == "addr" ]] ; then ...@@ -550,6 +550,10 @@ elif [[ $object == "addr" ]] ; then
opt_family="ipv4" opt_family="ipv4"
fi fi
fi fi
[[ "$opt_family" == "ipv4" ]] && [[ ! "$mask" == *.* ]] && \
mask=$(prefix_to_netmask $mask)
shift shift
elif [[ $command == "list" ]] ; then elif [[ $command == "list" ]] ; then
command="show" command="show"
...@@ -562,9 +566,6 @@ elif [[ $object == "addr" ]] ; then ...@@ -562,9 +566,6 @@ 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"
......
...@@ -28,8 +28,9 @@ Source: "opt\downloads\pyOpenSSL-0.13.tar.gz"; DestDir: "{app}\cygwin"; DestName ...@@ -28,8 +28,9 @@ Source: "opt\downloads\pyOpenSSL-0.13.tar.gz"; DestDir: "{app}\cygwin"; DestName
Source: "opt\git\re6stnet\dist\re6stnet-0.1.tar.gz"; DestDir: "{app}\cygwin"; DestName: "re6stnet-0.1.tar.gz"; Flags: deleteafterinstall; Source: "opt\git\re6stnet\dist\re6stnet-0.1.tar.gz"; DestDir: "{app}\cygwin"; DestName: "re6stnet-0.1.tar.gz"; Flags: deleteafterinstall;
Source: "opt\downloads\miniupnpc-1.8.tar.gz"; DestDir: "{app}\cygwin"; DestName: "miniupnpc.tar.gz"; Flags: deleteafterinstall; Source: "opt\downloads\miniupnpc-1.8.tar.gz"; DestDir: "{app}\cygwin"; DestName: "miniupnpc.tar.gz"; Flags: deleteafterinstall;
Source: "opt\git\slapos\component\cygwin\slapos-core.patch"; DestDir: "{app}\cygwin\etc\slapos\patches"; Source: "src\patch\slapos-core-format.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "opt\git\slapos\component\cygwin\slapos-cookbook-inotifyx.patch"; DestDir: "{app}\cygwin\etc\slapos\patches"; Source: "src\patch\slapos-cookbook-inotifyx.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "src\patch\slapos-core-env.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "opt\git\qooxdoo\application\playground\build\*"; DestDir: "{app}\cygwin\etc\slapos\desktop"; Flags: recursesubdirs; Source: "opt\git\qooxdoo\application\playground\build\*"; DestDir: "{app}\cygwin\etc\slapos\desktop"; Flags: recursesubdirs;
Source: "opt\git\qooxdoo\application\showcase\build\*"; DestDir: "{app}\cygwin\etc\slapos\node"; Flags: recursesubdirs; Source: "opt\git\qooxdoo\application\showcase\build\*"; DestDir: "{app}\cygwin\etc\slapos\node"; Flags: recursesubdirs;
......
...@@ -77,8 +77,8 @@ function connection2guid() ...@@ -77,8 +77,8 @@ function connection2guid()
sed -e "s/^GUID\s*:\s*//" sed -e "s/^GUID\s*:\s*//"
} }
node_certificate_file=/etc/opt/slapos/ssl/certificate node_certificate_file=/etc/opt/slapos/ssl/computer.crt
node_key_file=/etc/opt/slapos/ssl/key node_key_file=/etc/opt/slapos/ssl/computer.key
node_config_file=/etc/opt/slapos/slapos.cfg node_config_file=/etc/opt/slapos/slapos.cfg
node_template_file=/etc/slapos/slapos.cfg.example node_template_file=/etc/slapos/slapos.cfg.example
run_key='\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' run_key='\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
......
...@@ -25,8 +25,9 @@ Name: "{app}\cygwin\etc\slapos\images" ...@@ -25,8 +25,9 @@ Name: "{app}\cygwin\etc\slapos\images"
Source: "opt\git\re6stnet\dist\re6stnet-0.1.tar.gz"; DestDir: "{app}\cygwin"; DestName: "re6stnet-0.1.tar.gz"; Flags: deleteafterinstall; Source: "opt\git\re6stnet\dist\re6stnet-0.1.tar.gz"; DestDir: "{app}\cygwin"; DestName: "re6stnet-0.1.tar.gz"; Flags: deleteafterinstall;
Source: "opt\downloads\miniupnpc-1.8.tar.gz"; DestDir: "{app}\cygwin"; DestName: "miniupnpc.tar.gz"; Flags: deleteafterinstall; Source: "opt\downloads\miniupnpc-1.8.tar.gz"; DestDir: "{app}\cygwin"; DestName: "miniupnpc.tar.gz"; Flags: deleteafterinstall;
Source: "opt\git\slapos\component\cygwin\slapos-core.patch"; DestDir: "{app}\cygwin\etc\slapos\patches"; Source: "src\patch\slapos-core-format.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "opt\git\slapos\component\cygwin\slapos-cookbook-inotifyx.patch"; DestDir: "{app}\cygwin\etc\slapos\patches"; Source: "src\patch\slapos-cookbook-inotifyx.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "src\patch\slapos-core-env.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "opt\git\qooxdoo\application\playground\build\*"; DestDir: "{app}\cygwin\etc\slapos\desktop"; Flags: recursesubdirs; Source: "opt\git\qooxdoo\application\playground\build\*"; DestDir: "{app}\cygwin\etc\slapos\desktop"; Flags: recursesubdirs;
Source: "opt\git\qooxdoo\application\showcase\build\*"; DestDir: "{app}\cygwin\etc\slapos\node"; Flags: recursesubdirs; Source: "opt\git\qooxdoo\application\showcase\build\*"; DestDir: "{app}\cygwin\etc\slapos\node"; Flags: recursesubdirs;
......
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