aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2012-01-28 19:32:05 +0100
committerChristian Ruppert <idl0r@gentoo.org>2012-01-28 19:32:05 +0100
commitfb4aa20d053d055a83cf25f07f4185ea79cb7b30 (patch)
treed216ae2f78e6830c6f02d334ef02cc2b90099b06 /init.d
parent5a8344a3d1068b2a7b24bf88f9a2882475b2a5ae (diff)
Use "checkpath -W" instead of dir_writable()
Diffstat (limited to 'init.d')
-rw-r--r--init.d/bootmisc.in8
-rw-r--r--init.d/consolefont.in2
-rw-r--r--init.d/keymaps.in2
-rw-r--r--init.d/termencoding.in2
4 files changed, 7 insertions, 7 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index d75cb6e7..a2afbf9f 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -20,7 +20,7 @@ cleanup_tmp_dir()
if ! [ -d "$dir" ]; then
mkdir -p "$dir" || return $?
fi
- dir_writable "$dir" || return 1
+ checkpath -W "$dir" || return 1
chmod a+rwt "$dir" 2> /dev/null
cd "$dir" || return 1
if yesno $wipe_tmp; then
@@ -117,7 +117,7 @@ start()
migrate_to_run /var/run /run
fi
- if dir_writable /var/run; then
+ if checkpath -W /var/run; then
ebegin "Creating user login records"
local xtra=
[ "$RC_UNAME" = NetBSD ] && xtra=x
@@ -159,7 +159,7 @@ start()
cleanup_tmp_dir "$tmp"
done
- if dir_writable /tmp; then
+ if checkpath -W /tmp; then
# Make sure our X11 stuff have the correct permissions
# Omit the chown as bootmisc is run before network is up
# and users may be using lame LDAP auth #139411
@@ -172,7 +172,7 @@ start()
fi
if yesno $log_dmesg; then
- if $logw || dir_writable /var/log; then
+ if $logw || checkpath -W /var/log; then
# Create an 'after-boot' dmesg log
if [ "$RC_SYS" != VSERVER -a "$RC_SYS" != OPENVZ ]; then
dmesg > /var/log/dmesg
diff --git a/init.d/consolefont.in b/init.d/consolefont.in
index 2f046d89..66b780d1 100644
--- a/init.d/consolefont.in
+++ b/init.d/consolefont.in
@@ -54,7 +54,7 @@ start()
eend $retval
# Store the last font so we can use it ASAP on boot
- if [ $retval -eq 0 ] && dir_writable "$RC_LIBEXECDIR"; then
+ if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
mkdir -p "$RC_LIBEXECDIR"/console
for font in /usr/share/consolefonts/"$consolefont".*; do
:
diff --git a/init.d/keymaps.in b/init.d/keymaps.in
index 851af5eb..a55a0e06 100644
--- a/init.d/keymaps.in
+++ b/init.d/keymaps.in
@@ -63,7 +63,7 @@ start()
fi
# Save the keymapping for use immediately at boot
- if dir_writable "$RC_LIBEXECDIR"; then
+ if checkpath -W "$RC_LIBEXECDIR"; then
mkdir -p "$RC_LIBEXECDIR"/console
dumpkeys >"$RC_LIBEXECDIR"/console/keymap
fi
diff --git a/init.d/termencoding.in b/init.d/termencoding.in
index b4218980..af4ed15a 100644
--- a/init.d/termencoding.in
+++ b/init.d/termencoding.in
@@ -35,7 +35,7 @@ start()
done
# Save the encoding for use immediately at boot
- if dir_writable "$RC_LIBEXECDIR"; then
+ if checkpath -W "$RC_LIBEXECDIR"; then
mkdir -p "$RC_LIBEXECDIR"/console
if yesno ${unicode:-${UNICODE}}; then
echo "" > "$RC_LIBEXECDIR"/console/unicode