site  contact  subhomenews

Bug with overlay workdir

September 17, 2025 — BarryK

Easy 7.0.11 is just out, and I have discovered a bug. It doesn't seem to be causing trouble, but needs to be fixed. If you look at /mnt/.easy_rw, you will see one or more folders named "tempwork*" (glob wildcard); these are overlay work-directories. However, some scripts scan the /mnt/.easy_rw folder to get the names of the containers; and also find these tempwork* folders and think they are containers, which they aren't.

In the 'init' script in the initrd, line 2081, have put in a filter, see comment #20250916:

 if [ "$EOS_SUPPORT_CONTAINERS" != "0" ];then
#also save any container sessions:
for EXE in `ls -1 /mnt/${WKG_DEV}/${WKG_DIR}containers | tr '\n' ' '`
do
#20250916 not a container, workdir for overlay...
if [ "${EXE:0:8}" == "tempwork" ];then
#easy 7.0.11 has a bug, delete if exist...
if [ -d /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE} ];then
rm -rf /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE}
fi
continue
fi
[ ! -d /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE}/.session ] && continue
#echo -n " ec-${EXE}"; mksquashfs /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE}/.session /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE}/rw-${prevVER}.sfs -comp gzip >/dev/null
cp -a -f /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE}/configuration /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE}/configuration-${INIT_DISTRO_VERSION} #200828 -a
done
fi

In the main filesystem, /usr/local/easy_version/easy-version-control script lists the "tempwork*" folders in the dropdown list of containers. Filtered them out, line 308:

      <comboboxtext><variable>EC_NAME</variable>${DEF_CON}<input>ls -1 /mnt/${WKG_DEV}/${WKG_DIR}containers | grep -v tempwork</input><action>refresh:EC_SNAP</action></comboboxtext>

In /etc/rc.d/rw-merge, line 38:

 RWfolders="$(find /mnt/.easy_rw/ -mindepth 1 -maxdepth 1 -type d | grep -v 'tempwork' | tr '\n' ' ')" #20250916

I put a precaution check into /usr/local/easy_containers/ec-fix-desktop, line 91:

for aDESK in `ls -1 /mnt/wkg/containers/*/desktop 2>/dev/null`
do
[ -z "$aDESK" ] && continue
case "$aDESK" in #20250916 precaution these should not exist.
*tempwork*)
rm -rf ${aDESK%/*}
continue
;;
esac

Also filter into /etc/init.d/ec-net, line 20:

case "$1" in
start|stop|restart)
#[ -f /mnt/wkg/containers/desk0/container/etc/resolv.conf ] && cp -a -f /etc/resolv.conf /mnt/wkg/containers/desk0/container/etc/
for aCONT in `ls -1 /mnt/wkg/containers`
do
[ "${aCONT:0:8}" == "tempwork" ] && continue #20250916
[ -f /mnt/wkg/containers/${aCONT}/container/etc/resolv.conf ] && cp -a -f /etc/resolv.conf /mnt/wkg/containers/${aCONT}/container/etc/
done
;;
esac

I'll do a bit more checking, probably upload 7.0.12 this evening.  

Tags: easy