From 57e42eaccca5a5cfca2d9a574dcf24e48b7ba70c Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 9 May 2013 02:43:30 +0000 Subject: [PATCH] 3543: fixed the issue that /etc/ cannot be set to tmpfs. It was caused by the /etc/mtab which is a speicfic file which is needed for mount command. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16230 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/statelite.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index f76a8f766..7aae70149 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -318,8 +318,10 @@ sub process_request { } } else { if ($tmpc[0] =~ m/link/) { + if ($tmpc[1] != "/etc/mtab") { $callback->({error=>[qq{Based on the option of $f, $fc should not use "link"-based options}], errorcode=>[1]}); return; + } } } if ( ($tmp[0] =~ m{persistent}) and ($tmpc[0] !~ m{persistent}) ) { @@ -767,6 +769,9 @@ sub liteItem { # 1. copy original contents if they exist to .default directory # 2. remove file # 3. create symbolic link to .statelite + if ($entry[1] == "/etc/mtab") { + $isChild = 0; + } if ($isChild == 0) { #check if the file has been moved to .default by its parent or by last liteimg, if yes, then do nothing