Index: Makefile =================================================================== RCS file: /home/pcvs/ports/sysutils/bacula-server/Makefile,v retrieving revision 1.78 diff -u -r1.78 Makefile --- Makefile 13 Jan 2007 17:01:57 -0000 1.78 +++ Makefile 19 Jan 2007 23:01:47 -0000 @@ -79,6 +79,7 @@ OPTIONS+= MYSQL "Use MySQL database instead of SqLite" off OPTIONS+= POSTGRESQL "Use PostgreSQL database instead of SqLite" off OPTIONS+= MTX "Install mtx for control of autochanger devices" off +OPTIONS+= AUTOSETEOT "Enable auto seteotmodel" off .endif OPTIONS+= NLS "Native Language Support via gettext utilities" on @@ -196,6 +197,9 @@ @${ECHO_MSG} "The default DB is SQLite-2!" .endif @${ECHO_MSG} " WITH_OPENSSL=yes Enable OpenSSL for encrypted communication." +.if !defined(WITH_AUTOSETEOT) + @${ECHO_MSG} " WITH_AUTOSETEOT=yes Enable auto seteotmodel (especially useful with TWO EOF = no.)" +.endif @${ECHO_MSG} "" @${ECHO_MSG} "===> Using ${DBTYPE} as the bacula database." @${ECHO_MSG} "" @@ -215,6 +219,10 @@ # In server port don't install filed @${REINPLACE_CMD} -e '/^fd_subdirs = /s|src/filed||' -e 's|src/console||' ${WRKSRC}/Makefile.in .endif +.if defined(WITH_AUTOSETEOT) + @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/eotmodel-src-stored-dev.c.patch +.endif + pre-install: if [ ! -d "${BACULA_DIR}" ]; then \ Index: files/eotmodel-src-stored-dev.c.patch @@ -0,0 +1,10 @@ +Index: src/stored/dev.c +@@ -2368,7 +2368,7 @@ + } + } + /* Turn this on later when fully tested */ +-#if defined(xxxMTIOCSETEOTMODEL) ++#if defined(MTIOCSETEOTMODEL) + uint32_t neof; + if (dev->has_cap(CAP_TWOEOF)) { + neof = 2;