Re: [PATCH 4/4] host/rootfs: clean up obsolete tmp dirs on mount

Alyssa Ross
2025-12-13T20:43:47Z

[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]

Demi Marie Obenour <demiobenour@gmail.com> writes:

> On 12/13/25 11:16, Alyssa Ross wrote:
>> In the ideal case, these will be cleaned up when the VM running them
>> exits, but there's always the possibility that there are some left
>> over, in which case mount time is the perfect time to clean up, when
>> we can be reasonably sure nothing else is still accessing them.
>>
>> Signed-off-by: Alyssa Ross <hi@alyssa.is>
>> ---
>> host/rootfs/image/usr/bin/mount-userdata | 36 ++++++++++++++++--------
>> 1 file changed, 25 insertions(+), 11 deletions(-)
>>
>> diff --git a/host/rootfs/image/usr/bin/mount-userdata b/host/rootfs/image/usr/bin/mount-userdata
>> index 6e4ac47d..2e130b83 100755
>> --- a/host/rootfs/image/usr/bin/mount-userdata
>> +++ b/host/rootfs/image/usr/bin/mount-userdata
>> @@ -7,18 +7,32 @@ backtick -D "" uuid {
>> blkid -o value -s UUID -- $1
>> }
>>
>> -multisubstitute {
>> - importas -Siu 0
>> - importas -Siu 1
>> - importas -Siu uuid
>> -}
>> -
>> -case $uuid {
>> - "" {
>> - fdmove -c 1 2
>> - printf "%s: '%s' does not have a UUID\n" $0 $1
>> +if {
>> + multisubstitute {
>> + importas -Siu 0
>> + importas -Siu 1
>> + importas -Siu uuid
>> }
>> +
>> + case $uuid {
>> + "" {
>> + fdmove -c 1 2
>> + printf "%s: '%s' does not have a UUID\n" $0 $1
>
> Is continuing after printing this error intentional?

No. I'd already noticed this and have fixed it. Should have posted a
v2.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]