aboutsummaryrefslogtreecommitdiff
path: root/network/hylafax+/doinst.sh
diff options
context:
space:
mode:
authorChristopher Walker <kris240376@gmail.com>2013-04-27 15:13:21 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2013-04-27 15:13:21 -0300
commit5609d8af84e509af98653af0494b91891b76ae73 (patch)
treede669951e978327f27661145fb958da2e312d2f3 /network/hylafax+/doinst.sh
parentfd782427278981012f3c5f98dfae918e0b2840b8 (diff)
network/hylafax+: Added (enterprise-class fax system)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/hylafax+/doinst.sh')
-rw-r--r--network/hylafax+/doinst.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/network/hylafax+/doinst.sh b/network/hylafax+/doinst.sh
new file mode 100644
index 000000000000..078b8ff35526
--- /dev/null
+++ b/network/hylafax+/doinst.sh
@@ -0,0 +1,44 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.hylafax.new
+
+config var/spool/hylafax/etc/dialrules.new
+config var/spool/hylafax/etc/dialrules.europe.new
+config var/spool/hylafax/etc/dialrules.sf-ba.new
+config var/spool/hylafax/etc/dpsprinter.ps.new
+config var/spool/hylafax/etc/hosts.hfaxd.new
+config var/spool/hylafax/etc/cover.templ.new
+config var/spool/hylafax/etc/dialrules-pabx.be.new
+config var/spool/hylafax/etc/dialrules.ext.new
+config var/spool/hylafax/etc/dialrules.uk.new
+config var/spool/hylafax/etc/dialrules.world.new
+
+# We warn about needed configuration to the /etc/inittab file.
+printf "\nThe following line will need be added to your /etc/inittab:
+please check if it is the correct tty device for the modem,
+and if not, change it to the correct one.
+ m0:23:respawn:/usr/libexec/hylafax/faxgetty ttyS0\n\n"
+# Hylafax faxgetty activation
+