import from HEAD:
[freeradius.git] / suse / dialup_admin.patch
1 --- dialup_admin/bin/clean_radacct
2 +++ dialup_admin/bin/clean_radacct
3 @@ -6,7 +6,7 @@
4  #
5  use POSIX;
6  
7 -$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
8 +$conf=shift||'/usr/share/dialup_admin/conf/admin.conf';
9  $back_days = 35;
10  
11  
12 --- dialup_admin/bin/dialup_admin.cron
13 +++ dialup_admin/bin/dialup_admin.cron
14 @@ -1,4 +1,4 @@
15 -1 0 * * * /usr/local/dialup_admin/bin/tot_stats >/dev/null 2>&1
16 -5 0 * * * /usr/local/dialup_admin/bin/monthly_tot_stats >/dev/null 2>&1
17 -10 0 1 * * /usr/local/dialup_admin/bin/truncate_radacct >/dev/null 2>&1
18 -15 0 1 * * /usr/local/dialup_admin/bin/clean_radacct >/dev/null 2>&1
19 +1 0 * * * /usr/share/dialup_admin/bin/tot_stats >/dev/null 2>&1
20 +5 0 * * * /usr/share/dialup_admin/bin/monthly_tot_stats >/dev/null 2>&1
21 +10 0 1 * * /usr/share/dialup_admin/bin/truncate_radacct >/dev/null 2>&1
22 +15 0 1 * * /usr/share/dialup_admin/bin/clean_radacct >/dev/null 2>&1
23 --- dialup_admin/bin/log_badlogins
24 +++ dialup_admin/bin/log_badlogins
25 @@ -17,7 +17,7 @@
26  $|=1;
27  
28  $file=shift||'none';
29 -$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
30 +$conf=shift||'/usr/share/dialup_admin/conf/admin.conf';
31  $all_file=shift||'no';
32  #
33  # Uncomment to force inserts even if there are sql errors. That can
34 --- dialup_admin/bin/monthly_tot_stats
35 +++ dialup_admin/bin/monthly_tot_stats
36 @@ -8,7 +8,7 @@
37  # Works only with mysql and postgresql
38  #
39  
40 -$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
41 +$conf=shift||'/usr/share/dialup_admin/conf/admin.conf';
42  
43  
44  open CONF, "<$conf"
45 --- dialup_admin/bin/showmodem
46 +++ dialup_admin/bin/showmodem
47 @@ -7,7 +7,7 @@
48  $comm=shift || "public";
49  $type=shift|| "xml";
50  
51 -$conf='/usr/local/dialup_admin/conf/admin.conf';
52 +$conf='/usr/share/dialup_admin/conf/admin.conf';
53  open CONF, "<$conf"
54         or die "Could not open configuration file\n";
55  while(<CONF>){
56 --- dialup_admin/bin/snmpfinger
57 +++ dialup_admin/bin/snmpfinger
58 @@ -6,7 +6,7 @@
59  $comm=shift || 'public';
60  $type=shift || 'cisco';
61  
62 -$conf='/usr/local/dialup_admin/conf/admin.conf';
63 +$conf='/usr/share/dialup_admin/conf/admin.conf';
64  open CONF, "<$conf"
65         or die "Could not open configuration file\n";
66  while(<CONF>){
67 --- dialup_admin/bin/tot_stats
68 +++ dialup_admin/bin/tot_stats
69 @@ -7,7 +7,7 @@
70  # Works with mysql and postgresql
71  #
72  
73 -$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
74 +$conf=shift||'/usr/share/dialup_admin/conf/admin.conf';
75  
76  
77  open CONF, "<$conf"
78 --- dialup_admin/bin/truncate_radacct
79 +++ dialup_admin/bin/truncate_radacct
80 @@ -6,7 +6,7 @@
81  #
82  use POSIX;
83  
84 -$conf=shift||'/usr/local/dialup_admin/conf/admin.conf';
85 +$conf=shift||'/usr/share/dialup_admin/conf/admin.conf';
86  $back_days = 90;
87  
88  
89 --- dialup_admin/conf/admin.conf
90 +++ dialup_admin/conf/admin.conf
91 @@ -19,11 +19,11 @@
92  #
93  # The directory where dialupadmin is installed
94  #
95 -general_base_dir: /usr/local/dialup_admin
96 +general_base_dir: /usr/share/dialup_admin
97  #
98  # The base directory of the freeradius radius installation
99  #
100 -general_radiusd_base_dir: /usr/local/radiusd
101 +general_radiusd_base_dir: /
102  general_domain: company.com
103  #
104  # Set it to yes to use sessions and cache the various mappings
105 @@ -66,8 +66,8 @@
106  general_raddb_dir: %{general_radiusd_base_dir}/etc/raddb
107  general_ldap_attrmap: %{general_raddb_dir}/ldap.attrmap
108  # Need to fix admin.conf file parser
109 -#general_clients_conf: %{general_raddb_dir}/clients.conf
110 -general_clients_conf: /usr/local/etc/raddb/clients.conf
111 +general_clients_conf: %{general_raddb_dir}/clients.conf
112 +#general_clients_conf: /usr/local/etc/raddb/clients.conf
113  general_sql_attrmap: %{general_base_dir}/conf/sql.attrmap
114  general_accounting_attrs_file: %{general_base_dir}/conf/accounting.attrs
115  general_extra_ldap_attrmap: %{general_base_dir}/conf/extra.ldap-attrmap
116 @@ -235,19 +235,19 @@
117  # This variable is used by the scripts in the bin folder
118  # It should contain the path to the sql binary used to run
119  # sql commands (mysql and psql are only supported for now)
120 -sql_command: /usr/local/bin/mysql
121 +sql_command: /usr/bin/mysql
122  #
123  # This variable is used by the scripts in the bin folder
124  # It should contain the snmp type and  path to the binary 
125  # used to run snmp commands. 
126  # (ucd = UCD-Snmp and net = Net-Snmp are only supported for now)
127  general_snmp_type: net
128 -general_snmpwalk_command: /usr/local/bin/snmpwalk
129 -general_snmpget_command: /usr/local/bin/snmpget
130 +general_snmpwalk_command: /usr/bin/snmpwalk
131 +general_snmpget_command: /usr/bin/snmpget
132  #
133  # Uncomment to enable sql debug
134  #
135 -sql_debug: true
136 +#sql_debug: true
137  #
138  # If set to yes then the HTTP credentials (http authentication)
139  # will be used to connect to the sql server instead of sql_username