mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
Merge pull request #1322 from jtfrey/centos7-changes
Altered statelite behavior w.r.t. /etc/mtab on RHEL7 distros
This commit is contained in:
commit
aa3465c1b0
@ -797,6 +797,18 @@ sub liteItem {
|
||||
# the /etc/mtab should be handled every time even the parent /etc/ has been handled.
|
||||
# if adding /etc/ to litefile, only tmpfs should be used.
|
||||
if ($entry[1] eq "/etc/mtab") {
|
||||
#
|
||||
# In RHEL7 /etc/mtab is a symlink to /proc/self/mounts and not a regular file.
|
||||
# If that's the case, then we skip forcing /etc/mtab into the .statelite path
|
||||
# and symlink'ing /etc/mtab to that file. Otherwise, since the OS isn't updating
|
||||
# /etc/mtab commands like "df" will not be happy.
|
||||
#
|
||||
my $ret=`readlink $rootimg_dir/etc/mtab`;
|
||||
chomp($ret);
|
||||
if ($? == 0 and ($ret eq '/proc/self/mounts') ) {
|
||||
$verbose && $callback->({info=>["skipping /etc/mtab (symlink to /proc/self/mounts)"]});
|
||||
next;
|
||||
}
|
||||
$isChild = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user