1. fill in the proper value in /etc/sysconfig/clock and set the timezone of the stateless/statelite node with site:timezone
2. copy libnss_files.so.2 from directory lib(for 32bit system) or lib64(for 64 bit system) into initrd git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16053 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
af2e791dc3
commit
3c0983f60f
@ -305,6 +305,12 @@ sub process_request {
|
||||
}
|
||||
if ($driverupdatesrc) { $cmd .= " --driverupdatesrc $driverupdatesrc"; }
|
||||
|
||||
if($osfamily eq "sles") {
|
||||
my @entries = xCAT::TableUtils->get_site_attribute("timezone");
|
||||
my $tz = $entries[0];
|
||||
if($tz) { $cmd .= " --timezone $tz"; }
|
||||
}
|
||||
|
||||
if ($imagename) {
|
||||
$cmd.= " $imagename";
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ my $permission; #the permission works only for statelite mode currently
|
||||
my $krpmver;
|
||||
my $tempfile;
|
||||
my $prompt;
|
||||
|
||||
my $timezone; #the TIMEZONE of the stateless and statelite node
|
||||
|
||||
sub xdie {
|
||||
system("rm -rf /tmp/xcatinitrd.$$");
|
||||
@ -95,6 +95,7 @@ GetOptions(
|
||||
'g=s' => \$krpmver,
|
||||
'permission=s' => \$permission,
|
||||
'kerneldir=s' => \$kerneldir,
|
||||
'timezone=s' => \$timezone,
|
||||
'tempfile=s' =>\$tempfile, #internal flag
|
||||
'pkglist=s' => \$pkglist, #internal flag
|
||||
'srcdir=s' => \$srcdir, #internal flag
|
||||
@ -1403,7 +1404,7 @@ END
|
||||
}
|
||||
}
|
||||
|
||||
if ($arch =~ /x86_64/) {
|
||||
if ($arch =~ /64/) {
|
||||
push @filestoadd,"lib64/libnss_dns.so.2";
|
||||
push @filestoadd,"lib64/libnss_files.so.2";
|
||||
}
|
||||
@ -1540,6 +1541,15 @@ sub postscripts { # TODO: customized postscripts
|
||||
sub generic_post { # This function is meant to leave the image in a state approximating a normal install
|
||||
my $cfgfile;
|
||||
|
||||
#modify /etc/sysconfig/clock in the image:HWCLOCK="--local", TIMEZONE=site:timezone
|
||||
if ($timezone) {
|
||||
system("sed -i '".'s!\(TIMEZONE=\).*!\1'."\"$timezone\"!"."' $rootimg_dir/etc/sysconfig/clock");
|
||||
system("chroot $rootimg_dir zic -l $timezone");
|
||||
}
|
||||
|
||||
system("sed -i 's!\\(HWCLOCK=\\).*!\\1\"--localtime\"!' $rootimg_dir/etc/sysconfig/clock");
|
||||
|
||||
|
||||
unlink("$rootimg_dir/dev/null");
|
||||
system("mknod $rootimg_dir/dev/null c 1 3");
|
||||
open($cfgfile,">","$rootimg_dir/etc/fstab");
|
||||
|
Loading…
Reference in New Issue
Block a user