--- a/scripts/hostname.pl
+++ b/scripts/hostname.pl
@@ -116,7 +116,7 @@
 sub get_addresses {
   Irssi::print("Resolving IP addresses...");
   %addresses = ();
-  open(IFCONFIG, "ifconfig|");
+  open(IFCONFIG, "/sbin/ifconfig|");
   while (<IFCONFIG>) {
     $addresses{$2} = resolve($2)
       if (/(inet addr:|inet6 addr: |inet |inet6 )([0-9a-f.:]*)/
