@@ -63,11 +63,15 @@ # define RESOLV_CONF_PATH @"/system/settings/network/resolv.conf" #elif defined(OF_AMIGAOS4) # define HOSTS_PATH @"DEVS:Internet/hosts" #elif defined(OF_AMIGAOS) # define HOSTS_PATH @"AmiTCP:db/hosts" -# define RESOLV_CONF_PATH @"AmiTCP:db/resolv.conf" +/* + * FIXME: The installer puts it there, but theoretically it could also be in + * AmiTCP:db/netdb or any of the files included there. + */ +# define RESOLV_CONF_PATH @"AmiTCP:db/netdb-myhost" #else # define HOSTS_PATH @"/etc/hosts" # define RESOLV_CONF_PATH @"/etc/resolv.conf" #endif @@ -257,11 +261,11 @@ - (void)parseHosts: (OFString *)path { void *pool = objc_autoreleasePoolPush(); OFCharacterSet *whitespaceCharacterSet = [OFCharacterSet whitespaceCharacterSet]; - OFCharacterSet *commentCharacterSet = + OFCharacterSet *commentCharacters = [OFCharacterSet characterSetWithCharactersInString: @"#;"]; OFMutableDictionary *staticHosts; OFFile *file; OFString *line; @@ -278,11 +282,11 @@ [file readLineWithEncoding: [OFLocale encoding]]) != nil) { OFArray *components, *hosts; size_t pos; OFString *address; - pos = [line indexOfCharacterFromSet: commentCharacterSet]; + pos = [line indexOfCharacterFromSet: commentCharacters]; if (pos != OFNotFound) line = [line substringToIndex: pos]; components = [line componentsSeparatedByCharactersInSet: whitespaceCharacterSet @@ -395,11 +399,11 @@ if (components.count < 2) { objc_autoreleasePoolPop(pool2); continue; } - option = components.firstObject; + option = [components.firstObject lowercaseString]; arguments = [components objectsInRange: OFMakeRange(1, components.count - 1)]; if ([option isEqual: @"nameserver"]) { if (arguments.count != 1) {