Commit 5ae38078 authored by Francesco Colista's avatar Francesco Colista
Browse files

main/hylafaxplus: shipped hfaxd.conf has now .default extension

hfaxd.conf is not in /etc dir, so at each upgrade this file
is overwritten rather than renamed with .apk-new.

With this patch, the shipped hfaxd.conf has .default extension.
In this way the hfaxd.conf file is never overwritten with the
upgrades.

the openrc init.d file checks if there's no hfaxd.conf and alert the user
following the same approach that is done with setup.cache.

Fixes #13085
parent 4892d9f0
......@@ -3,7 +3,7 @@
pkgname=hylafaxplus
_pkgname=hylafax
pkgver=7.0.4
pkgrel=4
pkgrel=5
pkgdesc="Making the Premier Open-Source Fax Management System Even Better"
url="http://hylafax.sourceforge.net"
arch="all"
......@@ -21,6 +21,7 @@ source="https://downloads.sourceforge.net/hylafax/$_pkgname-$pkgver.tar.gz
no-locale.patch
utf8-dictionary.patch
dont-ship-xferfaxlog-file.patch
config-files-default-extension.patch
"
builddir="$srcdir"/$_pkgname-$pkgver
......@@ -102,10 +103,11 @@ package() {
sha512sums="
e4ccb22c93d74a3b03f876998a9330db091ef1f60e78fb2dc4d38367188e4ad75b89de07c2f0eb477051df0136961cf79c4a5ce3cfe5d9370d631afdeec858a2 hylafax-7.0.4.tar.gz
63f032b4b39dfb03380815a1a6290c5c4338761af8fecc0e55cf6f60bcbcb02e90780659e283d35911504c07d3e7492d19a2b1c08140d2e8f314649872b301f4 hylafaxplus.initd
ae9de1dbf53ef64acd8b03515c5cd840c12596921edb8c45a333eb7a69e911ec3a449a9f0201c5c73d54d9f01c4696f1accacf1e83137737341a5913f0725b16 hylafaxplus.initd
a2117eddc8f0ff70a23a90f2001dcb88c5bddee46ffa021d6d1701cc5cfc3bcb0362ead2b1b1ce2b288992728053c5947466d08916649f45e7dfb1876576e50f hylafaxplus.confd
41ae2055a7781d83fc275aafe18ced0fe75ba79d3ad7d5096eabaeae3a514b564723185dd33820268577174f6c53bfcfddb30922ba50754b15c5c3b0abbec837 common-functions-busybox-awk.patch
4a1243daff9904e6395c3e28aa4a78a74de99f5aa9dbf5055a3781acfcd9b1b3db42b1569409b27e3ef9b0e55272dc99122436a79a08c9a1c140c2547c5a2c15 no-locale.patch
f5f1e33897a91b8297311c033d50e7ea2f9088568264a5b9224285066a504da8cc4296f973dd0a70e09abca538cef26964c6181f4f67f76400783d0697f05e61 utf8-dictionary.patch
56a747d0592a4f7caa90b4bbf2f7f01a8000e80bea0f33a4d15af87315789cc3ca0b6031312db6d7a93ac4f4d16abe540331ef841c4911b291f0af30e41c8e8f dont-ship-xferfaxlog-file.patch
49bd5e1f590c59de1a96cafa96f3ce5ba0afbacbf08f026682f5be56e4405f95a06df6acef5429a158652b967a446c7c976274729342608527ccbc035979f0b1 config-files-default-extension.patch
"
diff --git a/etc/Makefile.in b/etc/Makefile.in
index 22aa277..f451d01 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -87,7 +87,7 @@ install: default
-src ${SRCDIR}/faxsetup.$$i -O faxsetup.$$i; \
done
${PUTSERVER} -root ${INSTALLROOT} -F ${SBIN} -m 755 -src probemodem.sh -O probemodem
- ${PUTSAMPLE} -root ${INSTALLROOT} -F ${SPOOL}/etc -m 600 -o hosts.hfaxd
+ ${PUTSAMPLE} -root ${INSTALLROOT} -F ${SPOOL}/etc -m 600 -o hosts.hfaxd.default
for i in ${DIALRULES}; do \
${PUTSERVER} -root ${INSTALLROOT} -F ${SPOOL}/etc -m 444 -src ${SRCDIR}/$$i \
-idb "config(update)" -O $$i; \
diff --git a/hfaxd/Makefile.in b/hfaxd/Makefile.in
index 90fdcfe..982cd81 100644
--- a/hfaxd/Makefile.in
+++ b/hfaxd/Makefile.in
@@ -98,7 +98,7 @@ install: default
${INSTALL} -root ${INSTALLROOT} -F ${LIBEXEC} -u root -m 755 \
-idb ${PRODUCT}.sw.server -O hfaxd
${INSTALL} -root ${INSTALLROOT} -F ${LIBDATA} -m 644 -idb ${PRODUCT}.sw.server \
- -idb "config(noupdate)" -src ${SRCDIR}/hfaxd.conf -O hfaxd.conf
+ -idb "config(noupdate)" -src ${SRCDIR}/hfaxd.conf -O hfaxd.conf.default
uninstall::
${RM} -f ${LIBEXEC}/hfaxd
......@@ -25,6 +25,11 @@ checkconfig() {
return 1
fi
if [ ! -f $SPOOL/lib/hfaxd.conf ] ; then
eerror "No $SPOOL/lib/hfaxd.conf file found. Rename and modify the hfaxd.conf.default"
return 1
fi
if [ ! -f $SPOOL/etc/setup.cache ] ; then
eerror "No $SPOOL/etc/setup.cache file found. Use faxsetup command"
return 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment