Skip to content

Commit f09ca47

Browse files
committed
init.d/*: check if RC_CACHEDIR is writtable
Bug: #890 Fixes: #936
1 parent ef1cd92 commit f09ca47

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

init.d/consolefont.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ start()
6161
eend $retval
6262

6363
# Store the font so we can use it ASAP on boot
64-
if [ $retval -eq 0 ] && checkpath -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
64+
if [ $retval -eq 0 ] && checkpath -W -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
6565
mkdir -p "$RC_CACHEDIR"/console
6666
setfont -O "$RC_CACHEDIR"/console/font
6767
fi

init.d/save-termencoding.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ start()
2323
{
2424
ebegin "Saving terminal encoding"
2525
# Save the encoding for use immediately at boot
26-
if checkpath -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
26+
if checkpath -W -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
2727
mkdir -p "$RC_CACHEDIR"/console
2828
if yesno ${unicode:-yes}; then
2929
echo "" > "$RC_CACHEDIR"/console/unicode

init.d/savecache.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ start()
2121
fi
2222
fi
2323

24-
if ! checkpath -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
24+
if ! checkpath -W -m 0755 -d "$RC_CACHEDIR" 2>/dev/null; then
2525
eerror "Unable to save dependency cache"
2626
if yesno "${RC_GOINGDOWN}"; then
2727
return 0

init.d/termencoding.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ start()
4141
done
4242

4343
# Save the encoding for use immediately at boot
44-
if checkpath -m 0755 -d "$RC_CACHEDIR"; then
44+
if checkpath -W -m 0755 -d "$RC_CACHEDIR"; then
4545
mkdir -p "$RC_CACHEDIR"/console
4646
if yesno ${unicode:-yes}; then
4747
echo "" > "$RC_CACHEDIR"/console/unicode

0 commit comments

Comments
 (0)