aboutsummaryrefslogtreecommitdiff
path: root/libs/unixodbc/files/odbc.init
blob: 32ae7f8cc03ae4dfd4fedf8a6d85a4543e3e5748 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh /etc/rc.common

START=50

gen_odbcinst() {
	local inifile

	echo "[ODBC]"
	echo "Trace = off"
	echo "TraceFile ="

	for inifile in /etc/odbcinst.ini.d/*.ini; do
		cat "$inifile"
	done
}

start() {
	[ ! -d /tmp/etc ] && mkdir /tmp/etc

	gen_odbcinst > /tmp/etc/odbcinst.ini.new
	chmod 0644 /tmp/etc/odbcinst.ini.new

	[ -e /tmp/etc/odbcinst.ini ] && ( rm /tmp/etc/odbcinst.ini || return 1 )

	mv /tmp/etc/odbcinst.ini.new /tmp/etc/odbcinst.ini
}