Can I ask why a cd is done in each command? It should not fail but risks it and it is unnecessary
find /home/nobody/ -mindepth 1 -delete || failed=1
is the same as:
cd /home/nobody/ && find -mindepth 1 -delete || failed=1
The same can be for clearing /tmp which appears to follow.
Nick
On 16/06/2024 15:37, Peter Müller wrote:
Signed-off-by: Peter Müllerpeter.mueller@ipfire.org
src/initscripts/system/cleanfs | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/initscripts/system/cleanfs b/src/initscripts/system/cleanfs index d1cbb2547..c78703070 100644 --- a/src/initscripts/system/cleanfs +++ b/src/initscripts/system/cleanfs @@ -112,6 +112,9 @@ case "${1}" in fi boot_mesg -n "Cleaning file systems:" ${INFO}
boot_mesg -n " /home/nobody" ${NORMAL}
cd /home/nobody/ && find . -mindepth 1 -delete || failed=1
- boot_mesg -n " /tmp" ${NORMAL} cd /tmp && find . -xdev -mindepth 1 ! -name lost+found \