The hostname(1) utility on Solaris does not take any switches; it assumes that anything in its argv[0] must be a new hostname, so if you run the above on a Solaris system, the hostname gets changed to "-f".
This is bad and should be changed back or, at least, avoided if we detect that we're on a SunOS-flavor system.
Environment
Solaris 10
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Benjamin Reed October 9, 2012 at 3:10 PM
Committed to 1.10.
Ron Roskens October 7, 2012 at 12:05 AM
is a duplicate of this issue.
Ron Roskens May 22, 2012 at 5:00 PM
Or instead of calling "hostname", just use the perl core module Sys::Hostname.
David Hustace May 11, 2012 at 9:51 AM
Don't run any commands as root when you don't have to. Especially on Slowlaris since you don't have to.
The send-event.pl utility recently changed as follows:
-chomp (my $hostname = `hostname`);
+chomp (my $hostname = `hostname -f`);
The hostname(1) utility on Solaris does not take any switches; it assumes that anything in its argv[0] must be a new hostname, so if you run the above on a Solaris system, the hostname gets changed to "-f".
This is bad and should be changed back or, at least, avoided if we detect that we're on a SunOS-flavor system.