From 79a7d3e4ccb41f63c01ba641757c2e87e71676ee Mon Sep 17 00:00:00 2001 From: daniceexi Date: Tue, 14 May 2013 02:20:47 +0000 Subject: [PATCH] add comment for why the /etc/mtab needs special case git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16278 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/statelite.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index 7aae70149..99aebdf7c 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -318,9 +318,12 @@ sub process_request { } } else { if ($tmpc[0] =~ m/link/) { + # The /etc/mtab is a specific file which can only be handled by link option. + # It need to be existed in rootimage and during the runing of statelite, + # and after running of statelite, it need to be linked to /proc/mount if ($tmpc[1] != "/etc/mtab") { - $callback->({error=>[qq{Based on the option of $f, $fc should not use "link"-based options}], errorcode=>[1]}); - return; + $callback->({error=>[qq{Based on the option of $f, $fc should not use "link"-based options}], errorcode=>[1]}); + return; } } } @@ -769,6 +772,9 @@ sub liteItem { # 1. copy original contents if they exist to .default directory # 2. remove file # 3. create symbolic link to .statelite + + # 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] == "/etc/mtab") { $isChild = 0; }