diff options
author | Stefan Schweizer <genstef@gentoo.org> | 2007-04-17 16:36:06 +0000 |
---|---|---|
committer | Stefan Schweizer <genstef@gentoo.org> | 2007-04-17 16:36:06 +0000 |
commit | cf64c71007a11d7195a5cde4bd371000c1648219 (patch) | |
tree | 64247e2b39c19288709c3b661bc548c42a16660f /sys-apps/915resolution/files | |
parent | remove 1.0.0 version (diff) | |
download | historical-cf64c71007a11d7195a5cde4bd371000c1648219.tar.gz historical-cf64c71007a11d7195a5cde4bd371000c1648219.tar.bz2 historical-cf64c71007a11d7195a5cde4bd371000c1648219.zip |
Version bump, add baselayout-2 compatibility
Package-Manager: portage-2.1.2.3
Diffstat (limited to 'sys-apps/915resolution/files')
-rw-r--r-- | sys-apps/915resolution/files/digest-915resolution-0.5.3 | 3 | ||||
-rw-r--r-- | sys-apps/915resolution/files/initd | 49 |
2 files changed, 35 insertions, 17 deletions
diff --git a/sys-apps/915resolution/files/digest-915resolution-0.5.3 b/sys-apps/915resolution/files/digest-915resolution-0.5.3 new file mode 100644 index 000000000000..db576029788c --- /dev/null +++ b/sys-apps/915resolution/files/digest-915resolution-0.5.3 @@ -0,0 +1,3 @@ +MD5 ed287778a53d02c31a7a6a52bc146291 915resolution-0.5.3.tar.gz 22583 +RMD160 a406c6810bbfcf94c5352ea1b1e9178af4078589 915resolution-0.5.3.tar.gz 22583 +SHA256 b64cab834b5e410bca555dc9db8e69f62f6f02496942f35ff4a68f3f27f1b542 915resolution-0.5.3.tar.gz 22583 diff --git a/sys-apps/915resolution/files/initd b/sys-apps/915resolution/files/initd index 1ad70cb09b70..b4825418d550 100644 --- a/sys-apps/915resolution/files/initd +++ b/sys-apps/915resolution/files/initd @@ -1,32 +1,47 @@ #!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/915resolution/files/initd,v 1.1 2006/07/22 17:29:44 chutzpah Exp $ depend() { - before xdm + before xdm +} + +# Credit to David Leverton for this function which handily maps a bash array +# structure to positional parameters so existing configs work :) +# We'll deprecate arrays at some point though. +_get_array() { + if [ -n "${BASH}" ] ; then + case "$(declare -p "$1" 2>/dev/null)" in + "declare -a "*) + echo "set -- \"\${$1[@]}\"" + return + ;; + esac + fi + + echo "eval set -- \"\$$1\"" } checkconfig() { - if [[ -z "${replace[*]}" ]]; then - eerror "You need to have at least one resolution to replace" - eerror "/etc/conf.d/915resolution" - return 1 - fi + if [[ -z "${replace[*]}" ]]; then + eerror "You need to have at least one resolution to replace" + eerror "/etc/conf.d/915resolution" + return 1 + fi - [[ "${log}" && -f "${log}" ]] && echo > "${log}" + [[ "${log}" && -f "${log}" ]] && echo > "${log}" - return 0 + return 0 } start() { - checkconfig || return 1 + checkconfig || return 1 - ebegin "Patching video BIOS with new video modes." + ebegin "Patching video BIOS with new video modes." - for mode in "${replace[@]}"; do - 915resolution ${mode} >> ${log:-/dev/null} || retval=$? - done + eval $(_get_array replace) + for mode in "$@"; do + 915resolution ${mode} >> ${log:-/dev/null}; retval=$? + done - eend ${retval} + eend ${retval} } + |