Commit 2b0adced authored by Jondy Zhao's avatar Jondy Zhao

Fix remap problem when run slapos command:

      0 [main] python2.7 3416 child_info_fork::abort: unable to remap _zope_interface_coptimizations.dll to same address as parent (0x450000) - try running rebaseall
      0 [main] python2.7 2332 child_info_fork::abort: unable to remap etree.dll to same address as parent (0x28B0000) - try running rebaseall
      0 [main] python2.7 3604 child_info_fork::abort: unable to remap _zope_interface_coptimizations.dll to same address as parent (0x450000) - try running rebaseall
parent 64fb154d
...@@ -21,7 +21,9 @@ function show_error_exit() ...@@ -21,7 +21,9 @@ function show_error_exit()
exit 1 exit 1
} }
password_filename=/etc/passwd local cyghome=$(cygpath -w /)
local password_filename=/etc/passwd
echo Checking /etc/passwd ... echo Checking /etc/passwd ...
if [[ ! -f $password_filename ]] ; then if [[ ! -f $password_filename ]] ; then
mkpasswd -l > $password_filename || show_error_exit "Error: mkpasswd failed" mkpasswd -l > $password_filename || show_error_exit "Error: mkpasswd failed"
...@@ -72,7 +74,6 @@ fi ...@@ -72,7 +74,6 @@ fi
_filename="/cygtty.bat" _filename="/cygtty.bat"
echo Checking ${_filename} ... echo Checking ${_filename} ...
if [[ ! -x ${_filename} ]] ; then if [[ ! -x ${_filename} ]] ; then
cyghome=$(cygpath -w /)
cat <<EOF > ${_filename} cat <<EOF > ${_filename}
@echo off @echo off
...@@ -90,12 +91,21 @@ fi ...@@ -90,12 +91,21 @@ fi
_filename="/autorebase.bat" _filename="/autorebase.bat"
echo Checking ${_filename} ... echo Checking ${_filename} ...
if [[ ! -f ${_filename} ]] ; then if [[ ! -f ${_filename} ]] ; then
cat <<EOF > /autorebase.bat cat <<EOF > ${_filename}
@echo off @echo off
rem Postinstall scripts are always started from the Cygwin root dir ${cyghome}\bin\find /opt/slapos -name "*.dll" > /myfile.list
rem so we can just call dash from here TASKKILL /F /IM openvpn.exe
NET STOP re6stnet
NET STOP cygserver
NET STOP syslog-ng
NET STOP cron
NET STOP sshd
TASKKILL /F /IM python2.7.exe
${cyghome:0:2}
chdir ${cyghome}
path .\bin;%path% path .\bin;%path%
dash /bin/rebaseall -p dash /bin/rebaseall -T /myfile.list -v
PAUSE ...
EOF EOF
chmod +x ${_filename} chmod +x ${_filename}
echo File ${_filename} has been generated. echo File ${_filename} has been generated.
......
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