blob: 32ae7f8cc03ae4dfd4fedf8a6d85a4543e3e5748 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh /etc/rc.common
2
3START=50
4
5gen_odbcinst() {
6 local inifile
7
8 echo "[ODBC]"
9 echo "Trace = off"
10 echo "TraceFile ="
11
12 for inifile in /etc/odbcinst.ini.d/*.ini; do
13 cat "$inifile"
14 done
15}
16
17start() {
18 [ ! -d /tmp/etc ] && mkdir /tmp/etc
19
20 gen_odbcinst > /tmp/etc/odbcinst.ini.new
21 chmod 0644 /tmp/etc/odbcinst.ini.new
22
23 [ -e /tmp/etc/odbcinst.ini ] && ( rm /tmp/etc/odbcinst.ini || return 1 )
24
25 mv /tmp/etc/odbcinst.ini.new /tmp/etc/odbcinst.ini
26}