From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RrD4k-00049N-MP for garchives@archives.gentoo.org; Sat, 28 Jan 2012 18:32:35 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E23ABE08EC; Sat, 28 Jan 2012 18:32:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9A6A9E08EC for ; Sat, 28 Jan 2012 18:32:27 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D985F1B400D for ; Sat, 28 Jan 2012 18:32:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1DE8180044 for ; Sat, 28 Jan 2012 18:32:26 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, sh/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/bootmisc.in init.d/consolefont.in init.d/keymaps.in init.d/termencoding.in sh/runscript.sh.in X-VCS-Directories: init.d/ sh/ X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: fb4aa20d053d055a83cf25f07f4185ea79cb7b30 Date: Sat, 28 Jan 2012 18:32:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 736ad478-53d0-4608-b300-91a715b506a9 X-Archives-Hash: 0c90f76928b9ab43fea44dcaf9509018 commit: fb4aa20d053d055a83cf25f07f4185ea79cb7b30 Author: Christian Ruppert gentoo org> AuthorDate: Sat Jan 28 18:32:05 2012 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Sat Jan 28 18:32:05 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3Dfb4aa20d Use "checkpath -W" instead of dir_writable() --- init.d/bootmisc.in | 8 ++++---- init.d/consolefont.in | 2 +- init.d/keymaps.in | 2 +- init.d/termencoding.in | 2 +- sh/runscript.sh.in | 5 ----- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index d75cb6e..a2afbf9 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 =20 - if dir_writable /var/run; then + if checkpath -W /var/run; then ebegin "Creating user login records" local xtra=3D [ "$RC_UNAME" =3D NetBSD ] && xtra=3Dx @@ -159,7 +159,7 @@ start() cleanup_tmp_dir "$tmp" done =20 - 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 =20 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" !=3D VSERVER -a "$RC_SYS" !=3D OPENVZ ]; then dmesg > /var/log/dmesg diff --git a/init.d/consolefont.in b/init.d/consolefont.in index 2f046d8..66b780d 100644 --- a/init.d/consolefont.in +++ b/init.d/consolefont.in @@ -54,7 +54,7 @@ start() eend $retval =20 # 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 851af5e..a55a0e0 100644 --- a/init.d/keymaps.in +++ b/init.d/keymaps.in @@ -63,7 +63,7 @@ start() fi =20 # 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 b421898..af4ed15 100644 --- a/init.d/termencoding.in +++ b/init.d/termencoding.in @@ -35,7 +35,7 @@ start() done =20 # 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 diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index faa85cc..18bf4c3 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -4,11 +4,6 @@ # Copyright (c) 2007-2009 Roy Marples # Released under the 2-clause BSD license. =20 -dir_writable() -{ - mkdir "$1"/.test.$$ 2>/dev/null && rmdir "$1"/.test.$$ -} - sourcex() { if [ "$1" =3D "-e" ]; then