Changeset bae014d9f22e13f6115d53d154e6489f20ae00e4
- Timestamp:
- 06/09/09 10:07:55 (3 years ago)
- Author:
- Neutron Soutmun <neo.neutron@…>
- Children:
- 7751a641e2a294d986b002dd01264b7d068258a2
- Parents:
- 927d0c70c763dcf56e6f12ebe02a51688468a5c3
- git-committer:
- Neutron Soutmun <neo.neutron@…> (06/09/09 10:07:55)
- Message:
-
Adjust build system config and install files
- Adjust build system config to install the files to appropriate paths.
- The MAINTAINERCLEANFILES was added.
- Now rahunas.db installed into the default directory /var/lib/rahunas.
- RahuNAS daemon executable file (rahunasd) now installed into /usr/sbin.
- Tool scripts now installed into the /usr/sbin and their names change to
satisfy the debian policy.
- Files:
-
- 1 added
- 1 removed
- 10 modified
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
|
r0772fb8
|
rbae014d
|
|
| 1 | 1 | EXTRA_DIST = weblogin |
| 2 | | SUBDIRS = xmlrpc lcfg src data |
| | 2 | SUBDIRS = xmlrpc lcfg src data tools example |
-
|
rca3a480
|
rbae014d
|
|
| 54 | 54 | AC_CHECK_FUNCS([dup2]) |
| 55 | 55 | AC_CONFIG_FILES([ |
| 56 | | Makefile |
| 57 | | xmlrpc/Makefile |
| | 56 | Makefile |
| | 57 | xmlrpc/Makefile |
| 58 | 58 | lcfg/Makefile |
| 59 | | src/Makefile |
| 60 | | data/Makefile |
| 61 | | src/include/linux/netfilter_ipv4/Makefile |
| 62 | | tools/firewall.sh |
| 63 | | tools/bandwidth.sh |
| 64 | | tools/weblogin-config-update.sh |
| | 59 | src/Makefile |
| | 60 | data/Makefile |
| | 61 | tools/Makefile |
| | 62 | tools/rahunas-firewall |
| | 63 | tools/rahunas-bandwidth |
| | 64 | tools/rahunas-weblogin-config-update |
| | 65 | example/Makefile |
| 65 | 66 | example/rahunas.default |
| 66 | 67 | example/rahunas.init |
-
|
rf51abe3
|
rbae014d
|
|
| 1 | 1 | # Rahunas configuration and database file |
| 2 | | configdir = $(sysconfdir)/rahunas |
| 3 | | config_DATA = rahunas.db |
| | 2 | MAINTAINERCLEANFILES = Makefile.in |
| 4 | 3 | |
| 5 | | EXTRA_DIST = $(config_DATA) |
| | 4 | databasedir = $(localstatedir)/lib/rahunas |
| | 5 | database_DATA = rahunas.db |
| | 6 | |
| | 7 | EXTRA_DIST = $(database_DATA) |
-
|
ra0fbd80
|
rbae014d
|
|
| 17 | 17 | exec_prefix=@exec_prefix@ |
| 18 | 18 | |
| 19 | | DAEMON=@bindir@/rahunasd |
| | 19 | DAEMON=@sbindir@/rahunasd |
| 20 | 20 | INIT=@sysconfdir@/default/rahunas |
| 21 | | FIREWALL=@sysconfdir@/rahunas/firewall.sh |
| 22 | | WEBLOGIN_CONFIG=@sysconfdir@/rahunas/weblogin-config-update.sh |
| | 21 | FIREWALL=@sbindir@/rahunas-firewall |
| | 22 | WEBLOGIN_CONFIG=@sbindir@/rahunas-weblogin-config-update |
| 23 | 23 | NAME=rahunasd |
| 24 | 24 | DESC="Rahu Network Access Server" |
-
|
r907730d
|
rbae014d
|
|
| | 1 | MAINTAINERCLEANFILES = Makefile.in |
| | 2 | |
| 1 | 3 | noinst_LIBRARIES = liblcfg.a |
| 2 | | |
| 3 | 4 | liblcfg_a_SOURCES = lcfg_static.c lcfg_static.h |
-
|
rebf1b31
|
rbae014d
|
|
| 1 | | SUBDIRS = include/linux/netfilter_ipv4 |
| | 1 | MAINTAINERCLEANFILES = Makefile.in |
| 2 | 2 | |
| 3 | | bin_PROGRAMS = rahunasd |
| | 3 | sbin_PROGRAMS = rahunasd |
| 4 | 4 | |
| 5 | 5 | IPSET_VERSION:=2.3.3 |
| 6 | 6 | |
| 7 | 7 | AM_CFLAGS = \ |
| 8 | | $(LIBGNET_CFLAGS) \ |
| 9 | | $(LIBGDA_CFLAGS) \ |
| 10 | | -I$(top_builddir)/src/include/ \ |
| 11 | | -DRAHUNAS_VERSION=\"$(RAHUNAS_VERSION)\" \ |
| 12 | | -DPROGRAM=\"$(PROGRAM)\" \ |
| 13 | | -DIPSET_VERSION=\"$(IPSET_VERSION)\" \ |
| 14 | | -DRAHUNAS_CONF_DIR=\"$(sysconfdir)/rahunas/\" \ |
| | 8 | $(LIBGNET_CFLAGS) \ |
| | 9 | $(LIBGDA_CFLAGS) \ |
| | 10 | -I$(top_builddir)/src/include/ \ |
| | 11 | -DRAHUNAS_VERSION=\"$(RAHUNAS_VERSION)\" \ |
| | 12 | -DPROGRAM=\"$(PROGRAM)\" \ |
| | 13 | -DIPSET_VERSION=\"$(IPSET_VERSION)\" \ |
| | 14 | -DRAHUNAS_CONF_DIR=\"$(sysconfdir)/rahunas/\" \ |
| | 15 | -DRAHUNAS_DB_DIR=\"$(localstatedir)/lib/rahunas/\" \ |
| 15 | 16 | -DRAHUNAS_LOG_DIR=\"$(localstatedir)/log/rahunas/\" \ |
| 16 | | -DRAHUNAS_RUN_DIR=\"$(localstatedir)/run/\" |
| | 17 | -DRAHUNAS_RUN_DIR=\"$(localstatedir)/run/\" \ |
| | 18 | -DRAHUNAS_FIREWALL_WRAPPER=\"$(sbindir)/rahunas-firewall\" \ |
| | 19 | -DRAHUNAS_BANDWIDTH_WRAPPER=\"$(sbindir)/rahunas-bandwidth\" |
| 17 | 20 | |
| 18 | 21 | rahunasd_SOURCES = \ |
| 19 | | rahunasd.c \ |
| 20 | | rahunasd.h \ |
| 21 | | rh-server.c \ |
| 22 | | rh-server.h \ |
| 23 | | rh-xmlrpc-server.c \ |
| 24 | | rh-xmlrpc-server.h \ |
| 25 | | rh-xmlrpc-cmd.c \ |
| 26 | | rh-xmlrpc-cmd.h \ |
| | 22 | rahunasd.c \ |
| | 23 | rahunasd.h \ |
| | 24 | rh-server.c \ |
| | 25 | rh-server.h \ |
| | 26 | rh-xmlrpc-server.c \ |
| | 27 | rh-xmlrpc-server.h \ |
| | 28 | rh-xmlrpc-cmd.c \ |
| | 29 | rh-xmlrpc-cmd.h \ |
| 27 | 30 | rh-ipset.c \ |
| 28 | | rh-ipset.h \ |
| 29 | | rh-utils.c \ |
| 30 | | rh-utils.h \ |
| 31 | | rh-task.c \ |
| 32 | | rh-task.h \ |
| 33 | | rh-task-iptables.c \ |
| 34 | | rh-task-iptables.h \ |
| 35 | | rh-task-memset.c \ |
| 36 | | rh-task-memset.h \ |
| 37 | | rh-task-ipset.c \ |
| 38 | | rh-task-ipset.h \ |
| 39 | | rh-task-dbset.c \ |
| 40 | | rh-task-dbset.h \ |
| | 31 | rh-ipset.h \ |
| | 32 | rh-utils.c \ |
| | 33 | rh-utils.h \ |
| | 34 | rh-task.c \ |
| | 35 | rh-task.h \ |
| | 36 | rh-task-iptables.c \ |
| | 37 | rh-task-iptables.h \ |
| | 38 | rh-task-memset.c \ |
| | 39 | rh-task-memset.h \ |
| | 40 | rh-task-ipset.c \ |
| | 41 | rh-task-ipset.h \ |
| | 42 | rh-task-dbset.c \ |
| | 43 | rh-task-dbset.h \ |
| 41 | 44 | rh-task-bandwidth.c \ |
| 42 | 45 | rh-task-bandwidth.h \ |
| 43 | 46 | rh-radius.h \ |
| 44 | 47 | rh-config.c \ |
| 45 | | rh-config.h |
| | 48 | rh-config.h |
| 46 | 49 | |
| 47 | 50 | rahunasd_LDADD = \ |
| 48 | | $(top_builddir)/xmlrpc/libgnetxmlrpc.a \ |
| | 51 | $(top_builddir)/xmlrpc/libgnetxmlrpc.a \ |
| 49 | 52 | $(top_builddir)/lcfg/liblcfg.a \ |
| 50 | | $(LIBGNET_LIBS) \ |
| 51 | | $(LIBGDA_LIBS) |
| | 53 | $(LIBGNET_LIBS) \ |
| | 54 | $(LIBGDA_LIBS) |
| | 55 | |
| | 56 | noinst_HEADERS = \ |
| | 57 | include/linux/netfilter_ipv4/ip_set.h \ |
| | 58 | include/linux/netfilter_ipv4/ip_set_rahunas.h |
| | 59 | |
-
|
r927d0c7
|
rbae014d
|
|
| 18 | 18 | #include "rh-task-memset.h" |
| 19 | 19 | #include "rh-utils.h" |
| 20 | | |
| 21 | | #define BANDWIDTH_WRAPPER "/etc/rahunas/bandwidth.sh" |
| 22 | 20 | |
| 23 | 21 | static unsigned short slot_flags[MAX_SLOT_PAGE] = {1}; |
| … |
… |
|
| 93 | 91 | if (pid == 0) { |
| 94 | 92 | // Child |
| 95 | | execv(BANDWIDTH_WRAPPER, args); |
| | 93 | execv(RAHUNAS_BANDWIDTH_WRAPPER, args); |
| 96 | 94 | } else if (pid < 0) { |
| 97 | 95 | // Fork error |
| … |
… |
|
| 142 | 140 | DP("Bandwidth: start"); |
| 143 | 141 | |
| 144 | | args[0] = BANDWIDTH_WRAPPER; |
| | 142 | args[0] = RAHUNAS_BANDWIDTH_WRAPPER; |
| 145 | 143 | args[1] = "start"; |
| 146 | 144 | args[2] = iface->dev_internal; |
| … |
… |
|
| 160 | 158 | DP("Bandwidth: stop"); |
| 161 | 159 | |
| 162 | | args[0] = BANDWIDTH_WRAPPER; |
| | 160 | args[0] = RAHUNAS_BANDWIDTH_WRAPPER; |
| 163 | 161 | args[1] = "stop"; |
| 164 | 162 | args[2] = iface->dev_internal; |
| … |
… |
|
| 178 | 176 | bw_req->ip, bw_req->bandwidth_max_down, bw_req->bandwidth_max_up); |
| 179 | 177 | |
| 180 | | args[0] = BANDWIDTH_WRAPPER; |
| | 178 | args[0] = RAHUNAS_BANDWIDTH_WRAPPER; |
| 181 | 179 | args[1] = "add"; |
| 182 | 180 | args[2] = bw_req->slot_id; |
| … |
… |
|
| 198 | 196 | DP("Bandwidth: request %s", bw_req->slot_id); |
| 199 | 197 | |
| 200 | | args[0] = BANDWIDTH_WRAPPER; |
| | 198 | args[0] = RAHUNAS_BANDWIDTH_WRAPPER; |
| 201 | 199 | args[1] = "del"; |
| 202 | 200 | args[2] = bw_req->slot_id; |
-
|
r927d0c7
|
rbae014d
|
|
| 250 | 250 | char ds_name[] = PROGRAM; |
| 251 | 251 | char ds_provider[] = "SQLite"; |
| 252 | | char ds_cnc_string[] = "DB_DIR=" RAHUNAS_CONF_DIR ";DB_NAME=" DB_NAME; |
| | 252 | char ds_cnc_string[] = "DB_DIR=" RAHUNAS_DB_DIR ";DB_NAME=" DB_NAME; |
| 253 | 253 | char ds_desc[] = "RahuNAS DB Set"; |
| 254 | 254 | |
-
|
raace70f
|
rbae014d
|
|
| 16 | 16 | #include "rh-task.h" |
| 17 | 17 | #include "rh-utils.h" |
| 18 | | |
| 19 | | #define IPTABLES_WRAPPER "/etc/rahunas/firewall.sh" |
| 20 | 18 | |
| 21 | 19 | int iptables_exec(struct vserver *vs, char *const args[]) |
| … |
… |
|
| 78 | 76 | if (pid == 0) { |
| 79 | 77 | // Child |
| 80 | | execve(IPTABLES_WRAPPER, args, env); |
| | 78 | execve(RAHUNAS_FIREWALL_WRAPPER, args, env); |
| 81 | 79 | } else if (pid < 0) { |
| 82 | 80 | // Fork error |
| … |
… |
|
| 113 | 111 | DP("IPTables: start"); |
| 114 | 112 | |
| 115 | | args[0] = IPTABLES_WRAPPER; |
| | 113 | args[0] = RAHUNAS_FIREWALL_WRAPPER; |
| 116 | 114 | args[1] = "start-config"; |
| 117 | 115 | args[2] = (char *) 0; |
| … |
… |
|
| 126 | 124 | DP("IPTables: stop"); |
| 127 | 125 | |
| 128 | | args[0] = IPTABLES_WRAPPER; |
| | 126 | args[0] = RAHUNAS_FIREWALL_WRAPPER; |
| 129 | 127 | args[1] = "stop-config"; |
| 130 | 128 | args[2] = (char *) 0; |
-
|
r03dc5e3
|
rbae014d
|
|
| 23 | 23 | |
| 24 | 24 | # DB |
| 25 | | RAHUNAS_DB=/etc/rahunas/rahunas.db |
| | 25 | RAHUNAS_DB=@localstatedir@/lib/rahunas/rahunas.db |
| 26 | 26 | SQLITE3=/usr/bin/sqlite3 |
| 27 | 27 | |
-
|
r4d5414b
|
rbae014d
|
|
| 2 | 2 | |
| 3 | 3 | @SET_MAKE@ |
| | 4 | |
| | 5 | MAINTAINERCLEANFILES = Makefile.in |
| 4 | 6 | |
| 5 | 7 | noinst_LIBRARIES = libgnetxmlrpc.a |