[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] noschg files not updated with "ezjail-admin update -i"



On 17/01/2012 20:14, geoffroy desvernay wrote:
> All is in the title...
> 
> I just discovered this on an installation with just 2 jails on zfs,
> using 3.2 and CVS ezjail-admin.
> 
> I'n not sure how ezjail-admin may handle this ?
> 
Don't think it's the better way, but worksforme®: ezjail-admin.diff attached

-- 
*Geoffroy Desvernay*
C.R.I - Administration systèmes et réseaux
Ecole Centrale de Marseille

--- ezjail-admin.orig   2012-01-14 21:51:59.118894564 +0100
+++ ezjail-admin        2012-01-17 20:40:28.361893453 +0100
@@ -271,7 +271,14 @@
   fi
   mkdir -p "${ezjail_jailbase}/usr"
   for dir in ${ezjail_dirlist}; do
+    schg_files=$(find ${dir} -flags schg)
+    [ -n "$schg_files" ] && for file in $schg_files; do
+      [ -f "${ezjail_jailbase}/$file" ] && chflags noschg ${ezjail_jailbase}/$file
+    done
     find ${dir} | cpio -d -p -v "${ezjail_jailbase}" || exerr "Error: Installation of ${dir} failed."
+    [ -n "$schg_files" ] && for file in $schg_files; do
+      chflags schg ${ezjail_jailbase}/$file
+    done
     chflags -R noschg ${dir}; rm -r ${dir}; ln -s /basejail/${dir} ${dir}
   done
   mkdir basejail

Attachment: signature.asc
Description: OpenPGP digital signature