
When install a software into a nfsroot, some unwanted files will be added into runtime dir, so rm them to keep nfsroot clean. Signed-off-by: Xu Xijian <hdxuxijian@163.com> --- container/add-software/run | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/container/add-software/run b/container/add-software/run index 62d4eff..60e5e07 100755 --- a/container/add-software/run +++ b/container/add-software/run @@ -40,7 +40,11 @@ install_cmds=( --rm -v "$rootdir":/mnt/root addsoftware:auto - yum install -y --skip-broken --installroot=/mnt/root $packages + bash -c " + yum install -y --skip-broken --installroot=/mnt/root $packages + cd /mnt/root + rm -rf srv/* opt/* mnt/* media/* home/* lost+found/* dev/* proc/* run/* sys/* + " ) echo "rsync rootfs from $basever to $newver..." -- 2.23.0