Improved venus init script as well as coda's pkg_config
authorMaurice van der Pot <griffon26@gentoo.org>
Sat, 23 Oct 2004 18:18:47 +0000 (18:18 +0000)
committerMaurice van der Pot <griffon26@gentoo.org>
Sat, 23 Oct 2004 18:18:47 +0000 (18:18 +0000)
net-fs/coda/ChangeLog
net-fs/coda/Manifest
net-fs/coda/coda-6.0.7.ebuild
net-fs/coda/files/6.0.7/venus [new file with mode: 0644]

index 6ee0c175d122137f72b9946567be8b9f9af64294..7e2749d414f96c0b88b266fef77c795599730db7 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for net-fs/coda
 # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.12 2004/10/23 15:33:57 griffon26 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.13 2004/10/23 18:18:47 griffon26 Exp $
+
+  23 Oct 2004; Maurice van der Pot <griffon26@gentoo.org> +files/6.0.7/venus,
+  coda-6.0.7.ebuild:
+  Fixed init script to not start venus in the background as it now daemonizes
+  after startup. Also adapted pkg_config to work with new createvol_rep.
 
 *coda-6.0.7 (23 Oct 2004)
 
index 48d06891dab4e838d55f0fa453e645dfb0604a96..4772dc97a624a7e0d62a9a12520520ed6fd959de 100644 (file)
@@ -4,8 +4,8 @@ Hash: SHA1
 MD5 f905a614fde3a85e0adefb203ece18fc metadata.xml 321
 MD5 14e8df1cfd403bd955f4de826e758920 coda-6.0.3.ebuild 2974
 MD5 bfd3abaab090ccc7e90b6b5aa4263a9d coda-6.0.6.ebuild 7603
-MD5 70839c250adba445286f8f7ff43c877c coda-6.0.7.ebuild 7289
-MD5 0d2f57c9f3616d1f8dd7c64b5f7ee46e ChangeLog 2715
+MD5 dda7dacd85f6fd3a73acc28f7f6e49f7 ChangeLog 2966
+MD5 c3971180feb0f7af6e4f5b51e41c8723 coda-6.0.7.ebuild 7581
 MD5 d21e4e5142a0266459b5ad8b39e3e707 files/coda-6.0.3-iowr.patch 607
 MD5 464a8cd91e3af12266c0570034388221 files/coda-6.0.6-gcc3.4.patch 1984
 MD5 d08316a08429d573d30dbc9924707206 files/digest-coda-6.0.3 63
@@ -15,10 +15,11 @@ MD5 f40f2b0227b97168e8dcd64c86f2e8cc files/codasrv 941
 MD5 1ea6425841d7fed645aad9d06d728ff7 files/auth2 1041
 MD5 494ef5b4a48b5a4aa77251d2b5942a91 files/venus 697
 MD5 0dd425125e2797d85724264c3255d77a files/digest-coda-6.0.7 63
+MD5 77ec9d405290c5bd33e924efe4624866 files/6.0.7/venus 702
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (GNU/Linux)
 
-iD8DBQFBenntMGnpIbeahxwRAs6oAKCbSld/AkgKLvShe3TVlnZxZzHv0QCfZpZY
-uOOitKcFqrZZ/fcNFEoaVq0=
-=y9L6
+iD8DBQFBeqCPMGnpIbeahxwRAslyAKCVFz6TAYdDoQzrpJNHbcfNGQSE0ACfR6DV
+5JS9qUu2SPXkC97wMpvgD6Q=
+=r6qi
 -----END PGP SIGNATURE-----
index 902f4f3e4f5f5b347ec75017c14648efb92c1806..3c051294875caf9e50ce1f29dfffe5a0188a98af 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.0.7.ebuild,v 1.1 2004/10/23 15:33:57 griffon26 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.0.7.ebuild,v 1.2 2004/10/23 18:18:47 griffon26 Exp $
 
 inherit eutils
 
@@ -77,7 +77,7 @@ src_install () {
        dodoc README* ChangeLog CREDITS LICENSE
 
        exeinto /etc/init.d
-       doexe ${FILESDIR}/venus
+       doexe ${FILESDIR}/${PV}/venus
        doexe ${FILESDIR}/coda-update
        doexe ${FILESDIR}/codasrv
        doexe ${FILESDIR}/auth2
@@ -230,15 +230,26 @@ pkg_config () {
 
        einfo "Creating root volume..."
        # Create root volume
-       createvol_rep ${CODA_ROOT_VOLUME} E0000100 ${CODA_STORAGE_DIR}/${VICE_PARTITION} &> /dev/null <<- EOF
+       createvoloutput=`createvol_rep ${CODA_ROOT_VOLUME} ${FQDN} 2>&1 <<- EOF
        n
-       EOF
+       EOF`
+       if ! volutil info ${CODA_ROOT_VOLUME} &> /dev/null
+       then
+               eerror "Unable to create root volume, output of createvol_rep follows"
+               echo "$createvoloutput"
+               exit 1
+       fi
 
        einfo "Creating writable volume..."
        # Create test volume
-       createvol_rep ${CODA_TEST_VOLUME} E0000100 ${CODA_STORAGE_DIR}/${VICE_PARTITION} &> /dev/null <<- EOF
+       createvoloutput=`createvol_rep ${CODA_TEST_VOLUME} ${FQDN} 2>&1 <<- EOF
        n
-       EOF
+       EOF`
+       if ! volutil info ${CODA_TEST_VOLUME} &> /dev/null; then
+               eerror "Unable to create writable volume, output of createvol_rep follows"
+               echo "$createvoloutput"
+               exit 1
+       fi
 
        einfo "Setting up venus (the coda client)..."
        venus-setup ${FQDN} 20000 > /dev/null
diff --git a/net-fs/coda/files/6.0.7/venus b/net-fs/coda/files/6.0.7/venus
new file mode 100644 (file)
index 0000000..d8a262c
--- /dev/null
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/files/6.0.7/venus,v 1.1 2004/10/23 18:18:47 griffon26 Exp $
+
+depend() {
+       need net
+       after codasrv
+}
+
+checkconfig() {
+       if ! /usr/sbin/codaconfedit venus.conf &>/dev/null; then
+               eerror "Please run venus-setup before starting the service..."
+               return 1
+       fi
+}
+
+start() {
+       checkconfig || return 1
+
+       ebegin "Starting venus"
+       start-stop-daemon --start --quiet --exec /usr/sbin/venus > /dev/null
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping venus"
+       start-stop-daemon --stop --quiet --exec /usr/sbin/venus
+       umount -l coda &>/dev/null
+       eend $?
+}