11 lines
619 B
Plaintext
11 lines
619 B
Plaintext
# Ensure the tmpdir exists with sticky 0o1777 permission.
|
|
#
|
|
# init runs each line as a standalone Oneshot command (no shell), so we cannot
|
|
# `rm -rf /tmp || true`. The previous `rm -rf /tmp` followed by a bare
|
|
# `mkdir /tmp` broke on a fresh boot: Redox's uutils `rm -f` errors on a
|
|
# missing operand ("cannot remove '/tmp': No such file or directory") — which
|
|
# POSIX says -f must ignore — and the subsequent non-`-p` mkdir then errors if
|
|
# /tmp already exists. A live boot has a fresh ramfs /tmp with nothing to
|
|
# clean, so just create it idempotently; `mkdir -p` is a no-op when present.
|
|
mkdir -p -m a=rwxt /tmp
|