mirror of
https://github.com/OpenRC/openrc.git
synced 2026-01-27 01:44:36 +00:00
init.d/*: check if RC_CACHEDIR is writtable
Bug: https://github.com/OpenRC/openrc/issues/890 Fixes: https://github.com/OpenRC/openrc/issues/936
This commit is contained in:
parent
ef1cd9255a
commit
f09ca47fe5
@ -61,7 +61,7 @@ start()
|
||||
eend $retval
|
||||
|
||||
# Store the font so we can use it ASAP on boot
|
||||
if [ $retval -eq 0 ] && checkpath -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
|
||||
if [ $retval -eq 0 ] && checkpath -W -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
|
||||
mkdir -p "$RC_CACHEDIR"/console
|
||||
setfont -O "$RC_CACHEDIR"/console/font
|
||||
fi
|
||||
|
||||
@ -23,7 +23,7 @@ start()
|
||||
{
|
||||
ebegin "Saving terminal encoding"
|
||||
# Save the encoding for use immediately at boot
|
||||
if checkpath -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
|
||||
if checkpath -W -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
|
||||
mkdir -p "$RC_CACHEDIR"/console
|
||||
if yesno ${unicode:-yes}; then
|
||||
echo "" > "$RC_CACHEDIR"/console/unicode
|
||||
|
||||
@ -21,7 +21,7 @@ start()
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! checkpath -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
|
||||
if ! checkpath -W -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
|
||||
eerror "Unable to save dependency cache"
|
||||
if yesno "${RC_GOINGDOWN}"; then
|
||||
return 0
|
||||
|
||||
@ -41,7 +41,7 @@ start()
|
||||
done
|
||||
|
||||
# Save the encoding for use immediately at boot
|
||||
if checkpath -m 0755 -d "$RC_CACHEDIR"; then
|
||||
if checkpath -W -m 0755 -d "$RC_CACHEDIR"; then
|
||||
mkdir -p "$RC_CACHEDIR"/console
|
||||
if yesno ${unicode:-yes}; then
|
||||
echo "" > "$RC_CACHEDIR"/console/unicode
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user