Commit 6936a313 authored by Marco Mariani's avatar Marco Mariani

windows: typos and grammar

parent 797cd66a
...@@ -172,7 +172,7 @@ static int ...@@ -172,7 +172,7 @@ static int
get_interface_forwards(char * guid) get_interface_forwards(char * guid)
{ {
long value = 0; long value = 0;
/* Location in the Windows XP, not sure in Vista or Windows 7 */ /* Location in Windows XP, not sure in Vista or Windows 7 */
char * key = "SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters" char * key = "SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters"
"\\Interfaces\\%s"; "\\Interfaces\\%s";
char * name = "Forwards"; char * name = "Forwards";
...@@ -449,7 +449,7 @@ libwinet_run_command(const char *command) ...@@ -449,7 +449,7 @@ libwinet_run_command(const char *command)
* *
* Gateway could be an address or interface name. * Gateway could be an address or interface name.
* *
* In the Windows 7, there is a little difference: * In Windows 7, there is a little difference:
* *
* Destination Prefix: ::/0 * Destination Prefix: ::/0
* Source Prefix: ::/0 * Source Prefix: ::/0
...@@ -510,7 +510,7 @@ libwinet_dump_ipv6_route_table(struct cyginet_route *routes, ...@@ -510,7 +510,7 @@ libwinet_dump_ipv6_route_table(struct cyginet_route *routes,
*p -- = 0; *p -- = 0;
/* The first field of route entry /* The first field of route entry
In the Windows XP, field name is "prefix", In Windows XP, field name is "prefix",
Windows 7, "Destination Prefix" Windows 7, "Destination Prefix"
*/ */
if ((strncmp(buffer, "Prefix", 6) == 0) || if ((strncmp(buffer, "Prefix", 6) == 0) ||
...@@ -1091,7 +1091,7 @@ libwinet_edit_route_entry(const struct sockaddr *dest, ...@@ -1091,7 +1091,7 @@ libwinet_edit_route_entry(const struct sockaddr *dest,
memset(&Row2, 0, sizeof(MIB_IPFORWARD_ROW2)); memset(&Row2, 0, sizeof(MIB_IPFORWARD_ROW2));
/* Row2.InterfaceLuid = 0; */ /* Row2.InterfaceLuid = 0; */
/* Maybe in the Vista, both of indexs are same. */ /* Maybe in Vista, both indexes are the same. */
Row2.InterfaceIndex = dest->sa_family == AF_INET6 ? Row2.InterfaceIndex = dest->sa_family == AF_INET6 ?
ifindex : libwinet_map_ifindex(AF_INET6, ifindex); ifindex : libwinet_map_ifindex(AF_INET6, ifindex);
Row2.DestinationPrefix.PrefixLength = plen; Row2.DestinationPrefix.PrefixLength = plen;
...@@ -1571,7 +1571,7 @@ cyginet_getifaddresses(char *ifname, ...@@ -1571,7 +1571,7 @@ cyginet_getifaddresses(char *ifname,
return dwReturn; return dwReturn;
} }
/* In the windows, loopback interface index is alawys 1 */ /* In windows, loopback interface index is alawys 1 */
int int
cyginet_loopback_index(int family) cyginet_loopback_index(int family)
{ {
...@@ -1579,7 +1579,7 @@ cyginet_loopback_index(int family) ...@@ -1579,7 +1579,7 @@ cyginet_loopback_index(int family)
} }
/* /*
* There are 3 ways to dump route table in the Windows: * There are 3 ways to dump route table in Windows:
* *
* Before Windows Vista * Before Windows Vista
* *
...@@ -2675,7 +2675,7 @@ VOID PrintAllInterfaces() ...@@ -2675,7 +2675,7 @@ VOID PrintAllInterfaces()
static void static void
runTestCases() runTestCases()
{ {
printf("\n\nTest getifaddrs works in the Cygwin:\n\n"); printf("\n\nTest getifaddrs works in Cygwin:\n\n");
{ {
struct ifaddrs * piftable, *pif; struct ifaddrs * piftable, *pif;
getifaddrs(&piftable); getifaddrs(&piftable);
...@@ -2684,7 +2684,7 @@ runTestCases() ...@@ -2684,7 +2684,7 @@ runTestCases()
freeifaddrs(piftable); freeifaddrs(piftable);
} }
printf("\n\nTest if_indexname works in the Cygwin:\n\n"); printf("\n\nTest if_indexname works in Cygwin:\n\n");
{ {
struct if_nameindex * ptr = (struct if_nameindex *)if_nameindex(); struct if_nameindex * ptr = (struct if_nameindex *)if_nameindex();
if (ptr) { if (ptr) {
...@@ -2697,7 +2697,7 @@ runTestCases() ...@@ -2697,7 +2697,7 @@ runTestCases()
} }
} }
printf("\n\nTest if_indextoname works in the Cygwin:\n\n"); printf("\n\nTest if_indextoname works in Cygwin:\n\n");
{ {
CHAR ifname[256]; CHAR ifname[256];
if (if_indextoname(1, ifname)) if (if_indextoname(1, ifname))
...@@ -2706,7 +2706,7 @@ runTestCases() ...@@ -2706,7 +2706,7 @@ runTestCases()
printf("if_indextoname failed\n"); printf("if_indextoname failed\n");
} }
printf("\n\nTest cyginet_ifname works in the Cygwin:\n\n"); printf("\n\nTest cyginet_ifname works in Cygwin:\n\n");
{ {
struct if_nameindex * ptr = (struct if_nameindex *)if_nameindex(); struct if_nameindex * ptr = (struct if_nameindex *)if_nameindex();
if (ptr) { if (ptr) {
...@@ -2728,7 +2728,7 @@ runTestCases() ...@@ -2728,7 +2728,7 @@ runTestCases()
); );
} }
*/ */
printf("\n\nTest cyginet_guidname works in the Cygwin:\n\n"); printf("\n\nTest cyginet_guidname works in Cygwin:\n\n");
{ {
PLIBWINET_INTERFACE_MAP_TABLE p = g_interface_map_table; PLIBWINET_INTERFACE_MAP_TABLE p = g_interface_map_table;
while (p) { while (p) {
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
http://msdn.microsoft.com/en-us/library/aa921042.aspx http://msdn.microsoft.com/en-us/library/aa921042.aspx
TCP/IP (v4 and v6) Technical Reference, it shows ipv4 and ipv6 how TCP/IP (v4 and v6) Technical Reference, it shows ipv4 and ipv6 how
to work in the windows. (Recommended) to work in windows. (Recommended)
http://technet.microsoft.com/en-us/library/dd379473(v=ws.10).aspx http://technet.microsoft.com/en-us/library/dd379473(v=ws.10).aspx
*/ */
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) #define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
#endif #endif
/* Missing defines in the Cygwin */ /* Missing defines in Cygwin */
#define RTM_ADD 0x1 /* Add Route */ #define RTM_ADD 0x1 /* Add Route */
#define RTM_DELETE 0x2 /* Delete Route */ #define RTM_DELETE 0x2 /* Delete Route */
#define RTM_CHANGE 0x3 /* Change Metrics or flags */ #define RTM_CHANGE 0x3 /* Change Metrics or flags */
......
...@@ -101,7 +101,7 @@ static int kernel_pipe_handles[2]; ...@@ -101,7 +101,7 @@ static int kernel_pipe_handles[2];
* forward- ing of IPv6 packets. Also, identify if the node is * forward- ing of IPv6 packets. Also, identify if the node is
* acting as a router. Defaults to off. * acting as a router. Defaults to off.
* *
* ==> In the Windows, MSDN says in the registry * ==> In Windows, MSDN says in the registry
* *
* HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
* *
...@@ -156,7 +156,7 @@ kernel_setup(int setup) ...@@ -156,7 +156,7 @@ kernel_setup(int setup)
if (0 != cyginet_startup()) if (0 != cyginet_startup())
return -1; return -1;
/* We don't disable ICMPv6 redirect in the Windows */ /* We don't disable ICMPv6 redirect in Windows */
/* /*
if ((rc = cyginet_set_icmp6_redirect_accept(0)) == -1) { if ((rc = cyginet_set_icmp6_redirect_accept(0)) == -1) {
fprintf(stderr, "Cannot disable ICMPv6 redirect.\n"); fprintf(stderr, "Cannot disable ICMPv6 redirect.\n");
...@@ -288,7 +288,7 @@ clear_kernel_socket_event() ...@@ -288,7 +288,7 @@ clear_kernel_socket_event()
* *
* RTF_CLONING: generate new routes on use * RTF_CLONING: generate new routes on use
* *
* Not implemented in the Windows. * Not implemented in Windows.
* *
*/ */
int int
...@@ -564,7 +564,7 @@ kernel_routes(struct kernel_route *routes, int maxroutes) ...@@ -564,7 +564,7 @@ kernel_routes(struct kernel_route *routes, int maxroutes)
} }
/* Note: ifname returned by getifaddrs maybe includes a suffix number /* Note: ifname returned by getifaddrs maybe includes a suffix number
in the Cygwin, it looks like: in Cygwin, it looks like:
{C05BAB6E-B82D-4C4D-AF07-EFF7C45C5DB0}_1 {C05BAB6E-B82D-4C4D-AF07-EFF7C45C5DB0}_1
{C05BAB6E-B82D-4C4D-AF07-EFF7C45C5DB0}_2 {C05BAB6E-B82D-4C4D-AF07-EFF7C45C5DB0}_2
...@@ -697,7 +697,7 @@ kernel_callback(int (*fn)(int, void*), void *closure) ...@@ -697,7 +697,7 @@ kernel_callback(int (*fn)(int, void*), void *closure)
{ {
if (kernel_socket < 0) kernel_setup_socket(1); if (kernel_socket < 0) kernel_setup_socket(1);
/* In the Windows, we can't get the exact changed route, but the /* In Windows, we can't get the exact changed route, but the
route table is really changed. */ route table is really changed. */
kdebugf("Kernel table changed.\n"); kdebugf("Kernel table changed.\n");
cyginet_refresh_interface_table(); cyginet_refresh_interface_table();
......
...@@ -51,7 +51,7 @@ babel_socket(int port) ...@@ -51,7 +51,7 @@ babel_socket(int port)
/* When this value is nonzero (the default on Windows), a socket /* When this value is nonzero (the default on Windows), a socket
created for the AF_INET6 address family can be used to send and created for the AF_INET6 address family can be used to send and
receive IPv6 packets only. So it's not require to set in the receive IPv6 packets only. So it's not required to set in
Windows XP. Actualy, this socket option is only supported on Windows XP. Actualy, this socket option is only supported on
Windows Vista or later. */ Windows Vista or later. */
#if !defined(_WIN32_WINNT) || _WIN32_WINNT >= 0x0600 #if !defined(_WIN32_WINNT) || _WIN32_WINNT >= 0x0600
......
...@@ -33,7 +33,7 @@ slapos node software ...@@ -33,7 +33,7 @@ slapos node software
slapos node instance slapos node instance
slapos node status slapos node status
</pre><p> </pre><p>
</p><p>For more information, refer to <a class="ulink" href="http://git.erp5.org/gitweb/slapos.core.git/blob/HEAD:/documentation/source/slapos.usage.rst?js=1" target="_top">http://git.erp5.org/gitweb/slapos.core.git/blob/HEAD:/documentation/source/slapos.usage.rst?js=1</a></p></div><div class="section" title="3.6.User Guide"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id9256241"></a>3.6.User Guide</h2></div></div></div><p>It just showes this documnet in the web browser.</p></div><div class="section" title="3.7.Cron Service"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id9256250"></a>3.7.Cron Service</h2></div></div></div><p>After run Configure SlapOS, a cron service will start in the background which used to release software and create instance periodically. Open Cygwin Terminal, type the following command to check cron jobs: </p><p>For more information, refer to <a class="ulink" href="http://git.erp5.org/gitweb/slapos.core.git/blob/HEAD:/documentation/source/slapos.usage.rst?js=1" target="_top">http://git.erp5.org/gitweb/slapos.core.git/blob/HEAD:/documentation/source/slapos.usage.rst?js=1</a></p></div><div class="section" title="3.6.User Guide"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id9256241"></a>3.6.User Guide</h2></div></div></div><p>It just shows this documnet in the web browser.</p></div><div class="section" title="3.7.Cron Service"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id9256250"></a>3.7.Cron Service</h2></div></div></div><p>After run Configure SlapOS, a cron service will start in the background which used to release software and create instance periodically. Open Cygwin Terminal, type the following command to check cron jobs:
</p><pre class="programlisting"> </p><pre class="programlisting">
# List all cron tabs # List all cron tabs
crontab -l crontab -l
......
...@@ -138,7 +138,7 @@ slapos node status ...@@ -138,7 +138,7 @@ slapos node status
</section> </section>
<section><title>User Guide</title> <section><title>User Guide</title>
<para>It just showes this documnet in the web browser.</para> <para>It just shows this documnet in the web browser.</para>
</section> </section>
<section><title>Cron Service</title> <section><title>Cron Service</title>
......
How to build for x86: How to build for x86:
Open ipwin.vcproj in the Microsoft Visual Studio 2008, Press F7 Open ipwin.vcproj in Microsoft Visual Studio 2008, Press F7
How to build for x64: How to build for x64:
......
...@@ -429,7 +429,7 @@ HRESULT SlaposNetCfgWinRenameConnection (LPWSTR pGuid, PCWSTR NewName) ...@@ -429,7 +429,7 @@ HRESULT SlaposNetCfgWinRenameConnection (LPWSTR pGuid, PCWSTR NewName)
lpHrRenameConnection RenameConnectionFunc = NULL; lpHrRenameConnection RenameConnectionFunc = NULL;
HRESULT status; HRESULT status;
/* First try the IShellFolder interface, which was unimplemented /* First try the IShellFolder interface, which was not implemented
* for the network connections folder before XP. */ * for the network connections folder before XP. */
status = rename_shellfolder (pGuid, NewName); status = rename_shellfolder (pGuid, NewName);
if (status == E_NOTIMPL) if (status == E_NOTIMPL)
......
...@@ -39,7 +39,7 @@ def main(): ...@@ -39,7 +39,7 @@ def main():
setup_args = dict( setup_args = dict(
name='netdrive', name='netdrive',
version=VERSION, version=VERSION,
description='A tool used to report the usage of net drive in the Windows', description='A tool used to report the usage of net drive in Windows',
long_description=get_description(), long_description=get_description(),
keywords=['netdrive',], keywords=['netdrive',],
py_modules=['netreport'], py_modules=['netreport'],
......
...@@ -91,21 +91,21 @@ netuse_user_info(PyObject *self, PyObject *args) ...@@ -91,21 +91,21 @@ netuse_user_info(PyObject *self, PyObject *args)
logonuser = userinfo; logonuser = userinfo;
len = wchar2mchar(pBuf->wkui1_username, logonuser, size); len = wchar2mchar(pBuf->wkui1_username, logonuser, size);
if (len == -1) { if (len == -1) {
PyErr_SetString(PyExc_RuntimeError, "Unicode convertion error"); PyErr_SetString(PyExc_RuntimeError, "Unicode conversion error");
return NULL; return NULL;
} }
size -= len; size -= len;
logondomain = logonuser + len; logondomain = logonuser + len;
len = wchar2mchar(pBuf->wkui1_logon_domain, logondomain, size); len = wchar2mchar(pBuf->wkui1_logon_domain, logondomain, size);
if (len == -1) { if (len == -1) {
PyErr_SetString(PyExc_RuntimeError, "Unicode convertion error"); PyErr_SetString(PyExc_RuntimeError, "Unicode conversion error");
return NULL; return NULL;
} }
size -= len; size -= len;
logonserver = logondomain + len; logonserver = logondomain + len;
len = wchar2mchar(pBuf->wkui1_logon_server, logonserver, size); len = wchar2mchar(pBuf->wkui1_logon_server, logonserver, size);
if (len == -1) { if (len == -1) {
PyErr_SetString(PyExc_RuntimeError, "Unicode convertion error"); PyErr_SetString(PyExc_RuntimeError, "Unicode conversion error");
return NULL; return NULL;
} }
} }
...@@ -163,7 +163,7 @@ netuse_map_drive(PyObject *self, PyObject *args) ...@@ -163,7 +163,7 @@ netuse_map_drive(PyObject *self, PyObject *args)
drive[0] = get_free_drive_letter(); drive[0] = get_free_drive_letter();
if (!drive[0]) { if (!drive[0]) {
PyErr_SetString(PyExc_RuntimeError, PyErr_SetString(PyExc_RuntimeError,
"Add net drive faild: no available drive letter." "Add net drive failed: no available drive letter."
); );
return NULL; return NULL;
} }
...@@ -403,7 +403,7 @@ PyMODINIT_FUNC initnetuse(void) ...@@ -403,7 +403,7 @@ PyMODINIT_FUNC initnetuse(void)
PyObject* module; PyObject* module;
module = Py_InitModule3("netuse", module = Py_InitModule3("netuse",
NetUseMethods, NetUseMethods,
"Show information about net resource in the Windows." "Show information about net resource in Windows."
); );
if (module == NULL) if (module == NULL)
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Simulate the linux command "ip" in the Windows. Most of functions # Simulate the linux command "ip" in Windows. Most of functions
# are mapped to windows command "netsh". Refer to ip man in the linux # are mapped to windows command "netsh". Refer to ip man in linux
# to know how to use this command. # to know how to use this command.
# #
# Synopsis (not all of options are implemented here), # Synopsis (not all of options are implemented here),
...@@ -408,7 +408,7 @@ while [[ "$1" != "" ]] && [[ "$object" == "" ]] ; do ...@@ -408,7 +408,7 @@ while [[ "$1" != "" ]] && [[ "$object" == "" ]] ; do
maddr | mroute | monitor | tuntap | vpntap) maddr | mroute | monitor | tuntap | vpntap)
object=$1 object=$1
;; ;;
*) echo Warning: unsupport options "$1" *) echo Warning: unsupported options "$1"
esac esac
shift shift
...@@ -428,7 +428,7 @@ fi ...@@ -428,7 +428,7 @@ fi
command=$1; shift command=$1; shift
if [[ "$command" == "" ]] ; then if [[ "$command" == "" ]] ; then
echo $orig_cmd echo $orig_cmd
echo "Error: missing command paramter." echo "Error: missing command parameter."
exit 1 exit 1
fi fi
...@@ -468,7 +468,7 @@ elif [[ $object == "addr" ]] ; then ...@@ -468,7 +468,7 @@ elif [[ $object == "addr" ]] ; then
dev=$(format_interface_name "$2") dev=$(format_interface_name "$2")
shift shift
;; ;;
*) echo Warning: unsupport parameter "$1" *) echo Warning: unsupported parameter "$1"
esac esac
shift shift
...@@ -601,7 +601,7 @@ elif [[ $object == "route" ]] ; then ...@@ -601,7 +601,7 @@ elif [[ $object == "route" ]] ; then
table="$2" table="$2"
shift shift
;; ;;
*) echo "Warning: unsupport parameter \"$1\" in the Cygwin" *) echo "Warning: unsupported parameter \"$1\" in Cygwin"
esac esac
shift; shift;
...@@ -610,7 +610,7 @@ elif [[ $object == "route" ]] ; then ...@@ -610,7 +610,7 @@ elif [[ $object == "route" ]] ; then
if [[ "$unreachable" == "1" ]] ; then if [[ "$unreachable" == "1" ]] ; then
if [[ "$opt_family" == "ipv4" || "$opt_family" == "" ]] ; then if [[ "$opt_family" == "ipv4" || "$opt_family" == "" ]] ; then
echo $orig_cmd echo $orig_cmd
echo "Error: unreachable ipv4 route entry is unimplemented" echo "Error: unreachable ipv4 route entry is not implemented"
exit 1 exit 1
else else
if [[ "$command" == "del" ]] ; then if [[ "$command" == "del" ]] ; then
...@@ -671,7 +671,7 @@ elif [[ $object == "vpntap" || $object == "tuntap" ]] ; then ...@@ -671,7 +671,7 @@ elif [[ $object == "vpntap" || $object == "tuntap" ]] ; then
mode=$2 mode=$2
shift shift
;; ;;
*) echo Warning: unsupport parameter "$1" *) echo Warning: unsupported parameter "$1"
esac esac
shift shift
...@@ -689,26 +689,26 @@ elif [[ $object == "vpntap" || $object == "tuntap" ]] ; then ...@@ -689,26 +689,26 @@ elif [[ $object == "vpntap" || $object == "tuntap" ]] ; then
exit 1 exit 1
fi fi
# elif [[ $object == "rule" ]] ; then # elif [[ $object == "rule" ]] ; then
# echo "Error: unsupported ip object \"$object\" in the Cygwin" # echo "Error: unsupported ip object \"$object\" in Cygwin"
# exit 1 # exit 1
# elif [[ $object == "neigh" ]] ; then # elif [[ $object == "neigh" ]] ; then
# echo "Error: unsupported ip object \"$object\" in the Cygwin" # echo "Error: unsupported ip object \"$object\" in Cygwin"
# exit 1 # exit 1
# elif [[ $object == "tunnel" ]] ; then # elif [[ $object == "tunnel" ]] ; then
# echo "Error: unsupported ip object \"$object\" in the Cygwin" # echo "Error: unsupported ip object \"$object\" in Cygwin"
# exit 1 # exit 1
# elif [[ $object == "maddr" ]] ; then # elif [[ $object == "maddr" ]] ; then
# echo "Error: unsupported ip object \"$object\" in the Cygwin" # echo "Error: unsupported ip object \"$object\" in Cygwin"
# exit 1 # exit 1
# elif [[ $object == "mroute" ]] ; then # elif [[ $object == "mroute" ]] ; then
# echo "Error: unsupported ip object \"$object\" in the Cygwin" # echo "Error: unsupported ip object \"$object\" in Cygwin"
# exit 1 # exit 1
# elif [[ $object == "monitor" ]] ; then # elif [[ $object == "monitor" ]] ; then
# echo "Error: unsupported ip object \"$object\" in the Cygwin" # echo "Error: unsupported ip object \"$object\" in Cygwin"
# exit 1 # exit 1
else else
echo $orig_cmd echo $orig_cmd
echo "Error: unsupported ip object \"$object\" in the Cygwin" echo "Error: unsupported ip object \"$object\" in Cygwin"
exit 1 exit 1
fi fi
......
...@@ -90,9 +90,9 @@ if [[ ! -d ~/.slapos ]] ; then ...@@ -90,9 +90,9 @@ if [[ ! -d ~/.slapos ]] ; then
fi fi
if [[ ! ( -f ~/.slapos/certificate && -f ~/.slapos/key ) ]] ; then if [[ ! ( -f ~/.slapos/certificate && -f ~/.slapos/key ) ]] ; then
echo "Error: missing certificate and key in the ~/.slapos \ echo "Error: missing certificate and key in ~/.slapos \
If you haven't an account in the slapos.org, please login https://www.slapos.org and signup. Otherwise to be sure both of files are stored in the ~/.slapos If you don't have an account in slapos.org, please login to https://www.slapos.org and signup. Otherwise check that both files are stored in ~/.slapos
" "
exit 1 exit 1
fi fi
...@@ -105,7 +105,7 @@ master_url = https://slap.vifib.com/ ...@@ -105,7 +105,7 @@ master_url = https://slap.vifib.com/
[slapconsole] [slapconsole]
# Put here retrieved certificate from vifib. # Put here retrieved certificate from vifib.
# Beware: put certificate from YOUR account, not the one from your node. # Beware: put certificate from YOUR account, not the one from your node.
# You (as identified person from vifib) will request an instance, node your node. # You (as identified person from vifib) will request an instance, not your node.
# Conclusion: node certificate != person certificate. # Conclusion: node certificate != person certificate.
cert_file = ~/.slapos/certificate cert_file = ~/.slapos/certificate
key_file = ~/.slapos/key key_file = ~/.slapos/key
...@@ -126,18 +126,18 @@ bin/slapos node register $nodename ...@@ -126,18 +126,18 @@ bin/slapos node register $nodename
# Check computer configure file: /etc/opt/slapos/slapos.cfg # Check computer configure file: /etc/opt/slapos/slapos.cfg
nodecfg=/etc/opt/slapos/slapos.cfg nodecfg=/etc/opt/slapos/slapos.cfg
if [[ ! -f $nodecfg ]] ; then if [[ ! -f $nodecfg ]] ; then
echo Error: something is wrong when register node. Can not find the configure file $nodecfg. echo Error: something is wrong when registering the node. Cannot find the configuration file $nodecfg.
exit 1 exit 1
fi fi
# check ipv6 # check ipv6
netsh interface ipv6 show interface > /dev/null || netsh interface ipv6 install netsh interface ipv6 show interface > /dev/null || netsh interface ipv6 install
# get GUID of the first physics netcard # get GUID of the first physical netcard
guidname=get_all_physical_netcard guidname=get_all_physical_netcard
if [[ "$guidname" == "" ]] ; then if [[ "$guidname" == "" ]] ; then
echo Error: no any physical netcard found. echo Error: no physical netcard found.
exit 1 exit 1
fi fi
...@@ -150,9 +150,9 @@ sed -i -e "s/^\\s*interface_name.*$/interface_name = ${IPINTERFACE}/g" \ ...@@ -150,9 +150,9 @@ sed -i -e "s/^\\s*interface_name.*$/interface_name = ${IPINTERFACE}/g" \
$nodecfg $nodecfg
# #
# Add run item when windows startup # Add run item at windows startup
echo Set slapos init script as Windows startup item. echo Set slapos init script as Windows startup item.
regtool -q set "$RUNKEY\\$SLAPOSNODEINIT" "\"$(cygpath -w /usr/bin/sh)\" --login -i /etc/slapos/scripts/init-slapos-node.sh" regtool -q set "$RUNKEY\\$SLAPOSNODEINIT" "\"$(cygpath -w /usr/bin/sh)\" --login -i /etc/slapos/scripts/init-slapos-node.sh"
(( $? )) && echo Fail to set init script as startup item. (( $? )) && echo Failed to set init script as startup item.
<html> <html>
<head><title>SlapOS Webrunner</title></head> <head><title>SlapOS Webrunner</title></head>
<body>Sorry, SlapOS Web Runner isn't installed now. Please run SlapOS Node at first by clicking Start -> SlapOS -> SlapOS Node. Be sure to run it as Administrator in the Windows 7.</body> <body>Sorry, SlapOS Web Runner is not installed now. Please run SlapOS Node first by clicking Start -> SlapOS -> SlapOS Node. Be sure to run it as Administrator in Windows 7.</body>
</html> </html>
...@@ -51,7 +51,7 @@ function show_usage() ...@@ -51,7 +51,7 @@ function show_usage()
echo " The configure item option:" echo " The configure item option:"
echo "" echo ""
echo " * All the configure item" echo " * All the configure item"
echo " re6stnet Install re6stent and dependencies" echo " re6stnet Install re6stnet and dependencies"
echo " config Generate slapos node and client configure files" echo " config Generate slapos node and client configure files"
echo " cron Generate cron file and start cron job" echo " cron Generate cron file and start cron job"
echo "" echo ""
...@@ -155,7 +155,7 @@ mkdir -p /etc/re6stnet ...@@ -155,7 +155,7 @@ mkdir -p /etc/re6stnet
# ----------------------------------------------------------- # -----------------------------------------------------------
# Create account: slaproot # Create account: slaproot
# ----------------------------------------------------------- # -----------------------------------------------------------
# Start seclogon service in the Windows XP # Start seclogon service in Windows XP
if csih_is_xp ; then if csih_is_xp ; then
csih_inform "Set start property of seclogon to auto" csih_inform "Set start property of seclogon to auto"
sc config seclogon start= auto || sc config seclogon start= auto ||
...@@ -342,7 +342,7 @@ csih_inform " user_base_name: ${slapos_user_basename}" ...@@ -342,7 +342,7 @@ csih_inform " user_base_name: ${slapos_user_basename}"
csih_inform csih_inform
csih_inform " If ipv4_local_network confilcts with your local network, change it" csih_inform " If ipv4_local_network confilcts with your local network, change it"
csih_inform " in the file: ${node_configure_file} " csih_inform " in the file: ${node_configure_file} "
csih_inform " Or change it in the $(dirname $0)/slapos-include.sh" csih_inform " Or change it in $(dirname $0)/slapos-include.sh"
csih_inform " and run Configure SlapOS again." csih_inform " and run Configure SlapOS again."
sed -i -e "s%^\\s*interface_name.*$%interface_name = ${interface_guid}%" \ sed -i -e "s%^\\s*interface_name.*$%interface_name = ${interface_guid}%" \
...@@ -518,7 +518,7 @@ if check_re6stnet_needed ; then ...@@ -518,7 +518,7 @@ if check_re6stnet_needed ; then
-u ${_administrator} -w ${csih_PRIVILEGED_PASSWORD} || -u ${_administrator} -w ${csih_PRIVILEGED_PASSWORD} ||
csih_error "Failed to install ${re6stnet_service_name} service." csih_error "Failed to install ${re6stnet_service_name} service."
fi fi
csih_inform "you can check log files in the /var/log/re6stnet/*.log" csih_inform "you can check log files in /var/log/re6stnet/*.log"
if ! check_cygwin_service ${re6stnet_service_name} ; then if ! check_cygwin_service ${re6stnet_service_name} ; then
csih_inform "Service ${re6stnet_service_name} is not running. One possible case" csih_inform "Service ${re6stnet_service_name} is not running. One possible case"
csih_inform "is that re6stnet service is shutdown in unusual ways, in this case" csih_inform "is that re6stnet service is shutdown in unusual ways, in this case"
...@@ -596,7 +596,7 @@ echo "" ...@@ -596,7 +596,7 @@ echo ""
# echo # echo
echo "" echo ""
csih_inform "Configure SlapOS successfully" csih_inform "SlapOS has been successfully configured"
echo "" echo ""
read -n 1 -t 60 -p "Press any key to exit..." read -n 1 -t 60 -p "Press any key to exit..."
......
...@@ -148,8 +148,8 @@ get_NT() { ...@@ -148,8 +148,8 @@ get_NT() {
# ====================================================================== # ======================================================================
warning_for_etc_file() { warning_for_etc_file() {
echo echo
echo "WARNING: The command above overwrites any existing /etc/$1." echo "WARNING: The above command overwrites any existing /etc/$1."
echo "You may want to preserve /etc/$1 before generating a new," echo "You may want to preserve /etc/$1 before generating a new"
echo "one, and then compare your saved /etc/$1 file with the" echo "one, and then compare your saved /etc/$1 file with the"
echo "newly-generated one in case you need to restore other" echo "newly-generated one in case you need to restore other"
echo "entries." echo "entries."
...@@ -590,13 +590,13 @@ create_user() { ...@@ -590,13 +590,13 @@ create_user() {
else else
username_in_sam= username_in_sam=
echo "User ${username} needs a password. It must match" echo "User ${username} needs a password. It must match"
echo "the rules in force on your system." echo "the rules enforced by your system."
getvalue "Please enter the password for ${username}:" -s getvalue "Please enter the password for ${username}:" -s
_password="${value}" _password="${value}"
echo echo
net user "${username}" "${_password}" /add /fullname:"Privileged server" /yes > "$TEMP_FILE" 2>&1 && username_in_sam=yes net user "${username}" "${_password}" /add /fullname:"Privileged server" /yes > "$TEMP_FILE" 2>&1 && username_in_sam=yes
if [ "${username_in_sam}" != "yes" ]; then if [ "${username_in_sam}" != "yes" ]; then
echo "ERROR: Creating the user '${username}' failed! Reason:" echo "ERROR: Creation of user '${username}' failed! Reason:"
cat "$TEMP_FILE" cat "$TEMP_FILE"
rm -f "$TEMP_FILE" rm -f "$TEMP_FILE"
echo echo
......
...@@ -8,7 +8,7 @@ readonly -f check_os_is_wow64 ...@@ -8,7 +8,7 @@ readonly -f check_os_is_wow64
function show_usage() function show_usage()
{ {
echo "This script is used to build a bootstrip slapos in the cywin." echo "This script is used to build a bootstrip slapos in cywin."
echo "" echo ""
echo "Usage:" echo "Usage:"
echo "" echo ""
...@@ -277,7 +277,7 @@ echo "" ...@@ -277,7 +277,7 @@ echo ""
# ----------------------------------------------------------- # -----------------------------------------------------------
# Format slapos node # Format slapos node
# ----------------------------------------------------------- # -----------------------------------------------------------
csih_inform "Formating SlapOS Node ..." csih_inform "Formatting SlapOS Node ..."
netsh interface ipv6 add addr ${slapos_ifname} ${ipv6_local_address} netsh interface ipv6 add addr ${slapos_ifname} ${ipv6_local_address}
/opt/slapos/bin/slapos node format -cv --now || /opt/slapos/bin/slapos node format -cv --now ||
......
...@@ -10,7 +10,7 @@ fi ...@@ -10,7 +10,7 @@ fi
csih_get_system_and_admins_ids csih_get_system_and_admins_ids
if [[ ! " $(id -G) " == *\ $csih_ADMINSUID\ * ]] ; then if [[ ! " $(id -G) " == *\ $csih_ADMINSUID\ * ]] ; then
echo echo
echo "You haven't right to run this script. " echo "You don't have the rights to run this script. "
echo "Please login as Administrator to run it, or right-click this script" echo "Please login as Administrator to run it, or right-click this script"
echo "then click Run as administrator." echo "then click Run as administrator."
echo echo
...@@ -124,7 +124,7 @@ function check_node_configure() ...@@ -124,7 +124,7 @@ function check_node_configure()
# ====================================================================== # ======================================================================
function check_client_configure() function check_client_configure()
{ {
csih_inform "Checking slapos client confiure ..." csih_inform "Checking slapos client configure ..."
[[ -f ${client_configure_file} ]] || [[ -f ${client_configure_file} ]] ||
csih_error "Missing client configure file: ${client_configure_file}" csih_error "Missing client configure file: ${client_configure_file}"
csih_inform "Check slapos client configure Over." csih_inform "Check slapos client configure Over."
...@@ -136,7 +136,7 @@ function check_client_configure() ...@@ -136,7 +136,7 @@ function check_client_configure()
# ====================================================================== # ======================================================================
function check_cron_configure() function check_cron_configure()
{ {
csih_inform "Checking slapos cron confiure ..." csih_inform "Checking slapos cron configure ..."
csih_inform "Check slapos cron configure Over." csih_inform "Check slapos cron configure Over."
} # === check_cron_configure() === # } # === check_cron_configure() === #
...@@ -146,7 +146,7 @@ function check_cron_configure() ...@@ -146,7 +146,7 @@ function check_cron_configure()
# ====================================================================== # ======================================================================
function check_re6stnet_configure() function check_re6stnet_configure()
{ {
csih_inform "Checking slapos re6stnet confiure ..." csih_inform "Checking slapos re6stnet configure ..."
which re6stnet > /dev/null 2>&1 || which re6stnet > /dev/null 2>&1 ||
csih_error "No re6stnet installed, please run Configure SlapOS first." csih_error "No re6stnet installed, please run Configure SlapOS first."
csih_inform "Check slapos re6stnet configure Over." csih_inform "Check slapos re6stnet configure Over."
...@@ -158,7 +158,7 @@ function check_re6stnet_configure() ...@@ -158,7 +158,7 @@ function check_re6stnet_configure()
# ====================================================================== # ======================================================================
function check_re6stnet_needed() function check_re6stnet_needed()
{ {
# This doesn't work in the cygwin now, need hack ip script # This doesn't work in cygwin now, need hack ip script
# re6st-conf --registry http://re6stnet.nexedi.com/ --is-needed # re6st-conf --registry http://re6stnet.nexedi.com/ --is-needed
if netsh interface ipv6 show route | grep -q " ::/0 " ; then if netsh interface ipv6 show route | grep -q " ::/0 " ; then
return 1 return 1
...@@ -298,15 +298,15 @@ slapos_check_and_create_privileged_user() ...@@ -298,15 +298,15 @@ slapos_check_and_create_privileged_user()
if [ -z "${_password}" ] if [ -z "${_password}" ]
then then
csih_error_multi "Exiting configuration. No user ${username} has been created," \ csih_error_multi "Exiting configuration. No user ${username} has been created," \
"and no services have been installed." "and no service has been installed."
fi fi
fi fi
tmpfile1=$(csih_mktemp) || csih_error "Could not create temp file" tmpfile1=$(csih_mktemp) || csih_error "Could not create temp file"
csih_call_winsys32 net user "${username}" "${_password}" /add /fullname:"SlapOS Administraoter" \ csih_call_winsys32 net user "${username}" "${_password}" /add /fullname:"SlapOS Administrator" \
"/homedir:${dos_var_empty}" /yes > "${tmpfile1}" 2>&1 && username_in_sam=yes "/homedir:${dos_var_empty}" /yes > "${tmpfile1}" 2>&1 && username_in_sam=yes
if [ "${username_in_sam}" != "yes" ] if [ "${username_in_sam}" != "yes" ]
then then
csih_warning "Creating the user '${username}' failed! Reason:" csih_warning "Creation of user '${username}' failed! Reason:"
/usr/bin/cat "${tmpfile1}" /usr/bin/cat "${tmpfile1}"
echo echo
fi fi
......
...@@ -50,7 +50,7 @@ fi ...@@ -50,7 +50,7 @@ fi
# ----------------------------------------------------------- # -----------------------------------------------------------
# Format slapos node # Format slapos node
# ----------------------------------------------------------- # -----------------------------------------------------------
csih_inform "Formating SlapOS Node ..." csih_inform "Formatting SlapOS Node ..."
/opt/slapos/bin/slapos node format -cv --now || /opt/slapos/bin/slapos node format -cv --now ||
csih_error "Run slapos node format failed. " csih_error "Run slapos node format failed. "
......
...@@ -49,8 +49,8 @@ fi ...@@ -49,8 +49,8 @@ fi
csih_get_system_and_admins_ids csih_get_system_and_admins_ids
if [[ ! " $(id -G) " == *\ $csih_ADMINSUID\ * ]] ; then if [[ ! " $(id -G) " == *\ $csih_ADMINSUID\ * ]] ; then
echo echo
echo "Note that creating a new user requires that the current account have" echo "Note that creating a new user requires that the current account has"
echo "Administrator privileges. You haven't right to run this script. " echo "Administrator privileges. You don't have the rights to run this script. "
echo "Please login as Administrator, or right-click this script" echo "Please login as Administrator, or right-click this script"
echo "then click Run as administrator." echo "then click Run as administrator."
echo echo
...@@ -96,7 +96,7 @@ function create_unprivileged_user() ...@@ -96,7 +96,7 @@ function create_unprivileged_user()
"/homedir:${dos_var_empty}" /active:no > /dev/null 2>&1 && unpriv_user_in_sam=yes "/homedir:${dos_var_empty}" /active:no > /dev/null 2>&1 && unpriv_user_in_sam=yes
if [ "${unpriv_user_in_sam}" != "yes" ] if [ "${unpriv_user_in_sam}" != "yes" ]
then then
csih_warning "Creating the user '${unpriv_user}' failed!" csih_warning "Creation of user '${unpriv_user}' failed!"
fi fi
fi fi
if [ "${unpriv_user_in_sam}" = "yes" ] if [ "${unpriv_user_in_sam}" = "yes" ]
...@@ -177,7 +177,7 @@ while getopts "Dd:g:G:p:s:r" opt ; do ...@@ -177,7 +177,7 @@ while getopts "Dd:g:G:p:s:r" opt ; do
r) r)
;; ;;
*) *)
echo Error when add user in the Cygwin echo Error while adding user in Cygwin
exit 1 exit 1
;; ;;
esac esac
...@@ -201,5 +201,5 @@ for grpname in ${USER_INIT_GROUP} ${USER_OTHER_GROUP} ; do ...@@ -201,5 +201,5 @@ for grpname in ${USER_INIT_GROUP} ${USER_OTHER_GROUP} ; do
done done
# net user "${USER_NAME}" /delete || # net user "${USER_NAME}" /delete ||
# (echo "Faild to delete user ${USER_NAME}" ; exit 1) # (echo "Failed to delete user ${USER_NAME}" ; exit 1)
# sed -i -e "/^${USER_NAME}/d" /etc/passwd # sed -i -e "/^${USER_NAME}/d" /etc/passwd
...@@ -59,7 +59,7 @@ while getopts "Dd:g:G:p:s:r" opt ; do ...@@ -59,7 +59,7 @@ while getopts "Dd:g:G:p:s:r" opt ; do
r) r)
;; ;;
*) *)
echo Error when add user in the Cygwin echo Error while adding user in Cygwin
exit 1 exit 1
;; ;;
esac esac
......
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