Skip to content

Commit f657717

Browse files
committed
generate-zbm: fix hostid comparison
1 parent 66da450 commit f657717

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/generate-zbm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,12 @@ if ( -f $spl_hostid ) {
295295
open PROC, $spl_hostid;
296296
$runConf{hostid}{module} = sprintf("%08x", <PROC>);
297297
close PROC;
298+
} else {
299+
$runConf{hostid}{module} = "00000000";
298300
}
299301

300302
my $etc_hostid = "/etc/hostid";
301-
if ( $runConf{hostid}{module} ne 0 and -f $etc_hostid ) {
303+
if ( $runConf{hostid}{module} ne "00000000" and -f $etc_hostid ) {
302304
open SPL, '<:raw', $etc_hostid;
303305
read SPL, my $hostid, 4;
304306
close SPL;

0 commit comments

Comments
 (0)