[OpenIndiana-discuss] extra entry in /etc/hosts after each reboot
alka
alka at hfg-gmuend.de
Fri Dec 20 18:02:57 UTC 2013
for those who are using napp-it and want to work with a local console as
root, the console messages are a serious problem.
What I can do is removing the ^ from the regular expression in next release
so you can comment this line without problems.
> > if ($t=~/127.0.0.1\s+$ok\b/) { $ok="1"; last; }
in /etc/hosts
# 127.0.0.1 hostname
Am 19.12.2013 um 18:45 schrieb wim at vandenberge.us:
> Unfortunately, for people (like myself) that put a hostname instead of an IP
> address in the /etc/hostname.<interface> files that means the system will become
> inaccessible from the network every reboot when running out-of-the-box napp-it.
>
> A simple workaround is to just comment out the section below from the
> agent-bootinit.pl script. I have not seen any DNS warnings on the console though
> but then again I run headless most of the time. Personally, I'm not fond of
> applications that modify system files every time they run (upon first
> installation is one thing, but every restart is quite another), but that's just
> me.
>
> Wim
>
>
>
>> On December 19, 2013 at 6:36 AM Guenther Alka <alka at hfg-gmuend.de> wrote:
>>
>>
>> This is a setting done by napp-it. It adds a entry to /etc/host like
>> 127.0.0.1 hostname
>>
>> reason:
>> Without this setting your root console is spammed with dns warnings.
>> in newest nightly, i added a comment at this point
>>
>> Gea
>>
>> Am 17.06.2013 22:14, schrieb wim at vandenberge.us:
>>> Thanks for the useful responses everyone. As one of the responses I received
>>> P2P
>>> mentioned, it turned out to be a fairly welknown issue with the snippet
>>> below in
>>> the agent-bootinit.pl script that comes with napp-it and not an OpenIndiana
>>> issue at all.
>>>
>>> Regards,
>>>
>>> W
>>>
>>>
>>> # check/update /etc/hosts: 127.0.0.1 hostname (old hostname missing)
>>> my $ok=`hostname`;
>>> $r=`cat /etc/hosts`; $r=~s/\n+/\n/gs;
>>> @t=(); @t=split(/\n/,$r);
>>> foreach my $t (@t) {
>>> if ($t=~/^127.0.0.1\s+$ok\b/) { $ok="1"; last; }
>>> }
>>> if ($ok ne "1") {
>>> push (@t,"127.0.0.1\t$ok\n");
>>> $t=join("\n", at t);
>>> open (PF, ">/etc/hosts");
>>> print PF "$t";
>>> close (PF);
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>> On June 17, 2013 at 3:55 PM Roel_D <openindiana at out-side.nl> wrote:
>>>>
>>>>
>>>> Aren't NWam and /network/default running together?
>>>>
>>>> Kind regards,
>>>>
>>>> The out-side
>>>>
>>>> Op 17 jun. 2013 om 20:16 heeft James Carlson <carlsonj at workingcode.com> het
>>>> volgende geschreven:
>>>>
>>>>> On 06/17/13 11:59, wim at vandenberge.us wrote:
>>>>>> At this point the interface is plumbed with the 127.0.0.1 address and the
>>>>>> machine is essentially unreachable over the network. This machine is a
>>>>>> plain
>>>>>> OpenIndiana install with napp-it on it.
>>>>>>
>>>>>> Its replica, installed at the same time and configured identically, is
>>>>>> not
>>>>>> exhibiting this kind of behavior. I've been searching where during
>>>>>> start-up
>>>>>> this
>>>>>> is occurring but have not been able to find anything yet.
>>>>> A few ideas in no particular order:
>>>>>
>>>>> 1. Right after one of these "bad" boots, do an "ls -l /etc/inet/hosts"
>>>>> to find out when the file was modified. Then do "svcs -s stime" to find
>>>>> out what service(s) were started at around the time the file was
>>>>> touched. Then go look at the method scripts for the suspicious ones.
>>>>>
>>>>> 2. Assuming it's a "normal" method of some sort that's doing this, grep
>>>>> around in /lib/svc/method/*.
>>>>>
>>>>> 3. Try one of the napp-it lists to see if someone there knows about this
>>>>> sort of behavior. I haven't seen it, and all of the old-school
>>>>> automatic hosts file modifications I've seen have always had an
>>>>> automatically-generated "# ..." comment describing the source of the
>>>>> change, so this sounds like something newish.
>>>>>
>>>>> --
>>>>> James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
>>>>>
>>>>> _______________________________________________
>>>>> OpenIndiana-discuss mailing list
>>>>> OpenIndiana-discuss at openindiana.org
>>>>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>>> _______________________________________________
>>>> OpenIndiana-discuss mailing list
>>>> OpenIndiana-discuss at openindiana.org
>>>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>> _______________________________________________
>>> OpenIndiana-discuss mailing list
>>> OpenIndiana-discuss at openindiana.org
>>> http://openindiana.org/mailman/listinfo/openindiana-discuss
>>
>>
>>
>> _______________________________________________
>> OpenIndiana-discuss mailing list
>> OpenIndiana-discuss at openindiana.org
>> http://openindiana.org/mailman/listinfo/openindiana-discuss
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
--
More information about the OpenIndiana-discuss
mailing list