sys-fs/udftools: Revbumps to use fixed init script.
authorLars Wendler <polynomial-c@gentoo.org>
Sat, 6 Jan 2018 22:08:03 +0000 (23:08 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Sat, 6 Jan 2018 22:08:21 +0000 (23:08 +0100)
Closes: https://bugs.gentoo.org/642770
Package-Manager: Portage-2.3.19, Repoman-2.3.6

sys-fs/udftools/files/pktcdvd.init
sys-fs/udftools/udftools-1.1-r1.ebuild [moved from sys-fs/udftools/udftools-1.1.ebuild with 93% similarity]
sys-fs/udftools/udftools-1.3-r1.ebuild [moved from sys-fs/udftools/udftools-1.3.ebuild with 94% similarity]
sys-fs/udftools/udftools-2.0-r1.ebuild [moved from sys-fs/udftools/udftools-2.0.ebuild with 100% similarity]

index 97375411e0e2d5caad234abe27e55db4e62b1ce4..97bd343682400c05f0995477dd0ef42de10b9afc 100644 (file)
@@ -1,13 +1,16 @@
 #!/sbin/openrc-run
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License, v2
 
+command="/usr/sbin/pktsetup"
+devdir="/dev/pktcdvd"
+
 depend() {
        need localmount modules
 }
 
 checkconfig() {
-       if ! [ -e /dev/pktcdvd/control ]; then
+       if ! [ -e "${devdir}/control" ] ; then
                eerror "Could not find packet-writing control device at /dev/pktcdvd/control"
                eerror "Please ensure that your kernel includes packet writing support,"
                eerror "and if modular, ensure that the module is loaded."
@@ -16,20 +19,21 @@ checkconfig() {
 }
 
 get_rw_devices() {
-       devices_raw=$(sed -re '/^drive name:/I!d; s/.*:\s+//' /proc/sys/dev/cdrom/info)
+       local sys_file="/proc/sys/dev/cdrom/info"
+       devices_raw=$(sed -re '/^drive name:/I!d; s/.*:\s+//' ${sys_file})
        count=0
-       for i in $devices_raw; do
+       for i in ${devices_raw} ; do
                eval "devices_$count=\"\$i\""
                count=$(( $count + 1 ))
        done
        devs=""
 
-       cdrw_caps=$(sed -re '/^Can write CD-RW:/I!d; s/.*:\s+//' /proc/sys/dev/cdrom/info)
+       cdrw_caps=$(sed -re '/^Can write CD-RW:/I!d; s/.*:\s+//' ${sys_file})
 
        count=0
-       for i in $cdrw_caps; do
+       for i in ${cdrw_caps} ; do
                [ "$i" -eq 1 ] && eval "devs=\"\$devs \$devices_$count\""
-               count=$(( $count + 1 ))
+               count=$(( ${count} + 1 ))
        done
 
        echo ${devs}
@@ -43,10 +47,10 @@ start() {
                devnode="/dev/${i}"
                [ -e "${devnode}" ] || continue
 
-               /usr/bin/pktsetup "${i}" "${devnode}" > /dev/null
-               [ -e "/dev/pktcdvd/${i}" ] || continue
-               chmod 660 "/dev/pktcdvd/${i}"
-               chgrp cdrw "/dev/pktcdvd/${i}"
+               ${command} "${i}" "${devnode}" > /dev/null
+               [ -e "${devdir}/${i}" ] || continue
+               chmod 660 "${devdir}/${i}"
+               chgrp cdrw "${devdir}/${i}"
        done
 }
 
@@ -55,7 +59,6 @@ stop() {
        
        for i in $(get_rw_devices)
        do
-               /usr/bin/pktsetup -d "${i}" > /dev/null
+               ${command} -d "${i}" > /dev/null
        done
 }
-
similarity index 93%
rename from sys-fs/udftools/udftools-1.1.ebuild
rename to sys-fs/udftools/udftools-1.1-r1.ebuild
index efaa1d7e62cc61b977f5b04ebddc963d41be5323..f0ef22a1e86d9c04e494107e38919f8c4561cc54 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
similarity index 94%
rename from sys-fs/udftools/udftools-1.3.ebuild
rename to sys-fs/udftools/udftools-1.3-r1.ebuild
index d2a858cd9b0ac50e3e3059a1aeae460f3c8e05b1..cd7b7e75dada03d7d3cdc1187bb95e3a2a5c05c9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"