equal
deleted
inserted
replaced
6579 name := self getCommandOutputFrom:'domainname' |
6579 name := self getCommandOutputFrom:'domainname' |
6580 ] |
6580 ] |
6581 ]. |
6581 ]. |
6582 name isNil ifTrue:[ |
6582 name isNil ifTrue:[ |
6583 "/ sometimes, we can extract the domainName from the hostName ... |
6583 "/ sometimes, we can extract the domainName from the hostName ... |
6584 hostName := self getHostName. |
6584 hostName := self primGetHostName. |
6585 hostName notNil ifTrue:[ |
6585 hostName notNil ifTrue:[ |
6586 idx := hostName indexOf:$.. |
6586 (hostName occurrencesOf:$.) == 1 ifTrue:[ |
6587 idx ~~ 0 ifTrue:[ |
6587 idx := hostName indexOf:$.. |
6588 name := hostName copyFrom:idx+1. |
6588 idx ~~ 0 ifTrue:[ |
|
6589 name := hostName copyFrom:idx+1. |
|
6590 ] |
6589 ] |
6591 ] |
6590 ]. |
6592 ]. |
6591 name isNil ifTrue:[ |
6593 name isNil ifTrue:[ |
6592 'UnixOperatingSystem [warning]: cannot find out domainname' errorPrintCR. |
6594 'UnixOperatingSystem [warning]: cannot find out domainname' errorPrintCR. |
6593 name := 'unknown'. |
6595 name := 'unknown'. |
6596 DomainName := name. |
6598 DomainName := name. |
6597 ^ name |
6599 ^ name |
6598 |
6600 |
6599 " |
6601 " |
6600 OperatingSystem getDomainName |
6602 OperatingSystem getDomainName |
|
6603 OperatingSystem getHostName |
|
6604 OperatingSystem primGetHostName |
6601 " |
6605 " |
6602 |
6606 |
6603 "Modified: 26.4.1996 / 10:04:54 / stefan" |
6607 "Modified: 26.4.1996 / 10:04:54 / stefan" |
6604 ! |
6608 ! |
6605 |
6609 |
6655 'UnixOperatingSystem [warning]: cannot find out hostname' errorPrintCR. |
6659 'UnixOperatingSystem [warning]: cannot find out hostname' errorPrintCR. |
6656 name := 'unknown'. |
6660 name := 'unknown'. |
6657 ] ifFalse:[ |
6661 ] ifFalse:[ |
6658 "/ on some systems, the hostname already contains the domain. |
6662 "/ on some systems, the hostname already contains the domain. |
6659 "/ decompose it here. |
6663 "/ decompose it here. |
6660 idx := name indexOf:$.. |
6664 (name occurrencesOf:$.) == 1 ifTrue:[ |
6661 idx ~~ 0 ifTrue:[ |
6665 idx := name indexOf:$.. |
6662 DomainName := name copyFrom:(idx+1). |
6666 idx ~~ 0 ifTrue:[ |
6663 name := name copyTo:(idx-1). |
6667 DomainName := name copyFrom:(idx+1). |
|
6668 name := name copyTo:(idx-1). |
|
6669 ] |
6664 ] |
6670 ] |
6665 ]. |
6671 ]. |
6666 HostName := name. |
6672 HostName := name. |
6667 ^ name |
6673 ^ name |
6668 |
6674 |
7853 #if defined(BSD) || defined(MACH) || defined(SYSV4) |
7859 #if defined(BSD) || defined(MACH) || defined(SYSV4) |
7854 RETURN ( true ); |
7860 RETURN ( true ); |
7855 #endif |
7861 #endif |
7856 %}. |
7862 %}. |
7857 ^ false |
7863 ^ false |
|
7864 |
|
7865 " |
|
7866 OperatingSystem isBSDlike |
|
7867 " |
7858 ! |
7868 ! |
7859 |
7869 |
7860 isUNIXlike |
7870 isUNIXlike |
7861 "return true, if the OS we're running on is a unix like." |
7871 "return true, if the OS we're running on is a unix like." |
7862 |
7872 |
7863 ^ true |
7873 ^ true |
7864 |
7874 |
7865 "Modified: / 5.6.1998 / 18:40:39 / cg" |
7875 " |
|
7876 OperatingSystem isUNIXlike |
|
7877 " |
7866 ! |
7878 ! |
7867 |
7879 |
7868 maxFileNameLength |
7880 maxFileNameLength |
7869 "return the max number of characters in a filename. |
7881 "return the max number of characters in a filename. |
7870 CAVEAT: |
7882 CAVEAT: |
10399 ! ! |
10411 ! ! |
10400 |
10412 |
10401 !UnixOperatingSystem::FilePointerHandle class methodsFor:'documentation'! |
10413 !UnixOperatingSystem::FilePointerHandle class methodsFor:'documentation'! |
10402 |
10414 |
10403 version |
10415 version |
10404 ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.119 2002-04-11 09:44:08 cg Exp $' |
10416 ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.120 2002-04-11 13:01:13 cg Exp $' |
10405 ! ! |
10417 ! ! |
10406 |
10418 |
10407 !UnixOperatingSystem::FilePointerHandle methodsFor:'release'! |
10419 !UnixOperatingSystem::FilePointerHandle methodsFor:'release'! |
10408 |
10420 |
10409 closeFile |
10421 closeFile |
12019 ! ! |
12031 ! ! |
12020 |
12032 |
12021 !UnixOperatingSystem class methodsFor:'documentation'! |
12033 !UnixOperatingSystem class methodsFor:'documentation'! |
12022 |
12034 |
12023 version |
12035 version |
12024 ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.119 2002-04-11 09:44:08 cg Exp $' |
12036 ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.120 2002-04-11 13:01:13 cg Exp $' |
12025 ! ! |
12037 ! ! |
12026 UnixOperatingSystem initialize! |
12038 UnixOperatingSystem initialize! |