Changeset bae014d9f22e13f6115d53d154e6489f20ae00e4

Show
Ignore:
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
  • Makefile.am

    r0772fb8 rbae014d  
    11EXTRA_DIST = weblogin 
    2 SUBDIRS = xmlrpc lcfg src data 
     2SUBDIRS = xmlrpc lcfg src data tools example 
  • configure.ac

    rca3a480 rbae014d  
    5454AC_CHECK_FUNCS([dup2]) 
    5555AC_CONFIG_FILES([ 
    56         Makefile 
    57         xmlrpc/Makefile 
     56  Makefile 
     57  xmlrpc/Makefile 
    5858  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 
    6566  example/rahunas.default 
    6667  example/rahunas.init 
  • data/Makefile.am

    rf51abe3 rbae014d  
    11# Rahunas configuration and database file 
    2 configdir = $(sysconfdir)/rahunas 
    3 config_DATA = rahunas.db 
     2MAINTAINERCLEANFILES = Makefile.in 
    43 
    5 EXTRA_DIST = $(config_DATA) 
     4databasedir = $(localstatedir)/lib/rahunas 
     5database_DATA = rahunas.db 
     6 
     7EXTRA_DIST = $(database_DATA) 
  • example/rahunas.init.in

    ra0fbd80 rbae014d  
    1717exec_prefix=@exec_prefix@ 
    1818 
    19 DAEMON=@bindir@/rahunasd 
     19DAEMON=@sbindir@/rahunasd 
    2020INIT=@sysconfdir@/default/rahunas 
    21 FIREWALL=@sysconfdir@/rahunas/firewall.sh 
    22 WEBLOGIN_CONFIG=@sysconfdir@/rahunas/weblogin-config-update.sh 
     21FIREWALL=@sbindir@/rahunas-firewall 
     22WEBLOGIN_CONFIG=@sbindir@/rahunas-weblogin-config-update 
    2323NAME=rahunasd 
    2424DESC="Rahu Network Access Server" 
  • lcfg/Makefile.am

    r907730d rbae014d  
     1MAINTAINERCLEANFILES = Makefile.in 
     2 
    13noinst_LIBRARIES = liblcfg.a 
    2  
    34liblcfg_a_SOURCES = lcfg_static.c lcfg_static.h  
  • src/Makefile.am

    rebf1b31 rbae014d  
    1 SUBDIRS = include/linux/netfilter_ipv4 
     1MAINTAINERCLEANFILES = Makefile.in 
    22 
    3 bin_PROGRAMS = rahunasd 
     3sbin_PROGRAMS = rahunasd 
    44 
    55IPSET_VERSION:=2.3.3 
    66 
    77AM_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/\" \ 
    1516  -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\" 
    1720 
    1821rahunasd_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 \ 
    2730  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 \ 
    4144  rh-task-bandwidth.c \ 
    4245  rh-task-bandwidth.h \ 
    4346  rh-radius.h \ 
    4447  rh-config.c \ 
    45         rh-config.h 
     48  rh-config.h 
    4649 
    4750rahunasd_LDADD =  \ 
    48         $(top_builddir)/xmlrpc/libgnetxmlrpc.a \ 
     51  $(top_builddir)/xmlrpc/libgnetxmlrpc.a \ 
    4952  $(top_builddir)/lcfg/liblcfg.a \ 
    50         $(LIBGNET_LIBS) \ 
    51         $(LIBGDA_LIBS) 
     53  $(LIBGNET_LIBS) \ 
     54  $(LIBGDA_LIBS) 
     55 
     56noinst_HEADERS = \ 
     57  include/linux/netfilter_ipv4/ip_set.h \ 
     58  include/linux/netfilter_ipv4/ip_set_rahunas.h 
     59 
  • src/rh-task-bandwidth.c

    r927d0c7 rbae014d  
    1818#include "rh-task-memset.h" 
    1919#include "rh-utils.h" 
    20  
    21 #define BANDWIDTH_WRAPPER "/etc/rahunas/bandwidth.sh" 
    2220 
    2321static unsigned short slot_flags[MAX_SLOT_PAGE] = {1}; 
     
    9391  if (pid == 0) { 
    9492    // Child 
    95     execv(BANDWIDTH_WRAPPER, args); 
     93    execv(RAHUNAS_BANDWIDTH_WRAPPER, args); 
    9694  } else if (pid < 0) { 
    9795    // Fork error 
     
    142140  DP("Bandwidth: start"); 
    143141 
    144   args[0] = BANDWIDTH_WRAPPER; 
     142  args[0] = RAHUNAS_BANDWIDTH_WRAPPER; 
    145143  args[1] = "start"; 
    146144  args[2] = iface->dev_internal; 
     
    160158  DP("Bandwidth: stop"); 
    161159 
    162   args[0] = BANDWIDTH_WRAPPER; 
     160  args[0] = RAHUNAS_BANDWIDTH_WRAPPER; 
    163161  args[1] = "stop"; 
    164162  args[2] = iface->dev_internal; 
     
    178176     bw_req->ip, bw_req->bandwidth_max_down, bw_req->bandwidth_max_up); 
    179177 
    180   args[0] = BANDWIDTH_WRAPPER; 
     178  args[0] = RAHUNAS_BANDWIDTH_WRAPPER; 
    181179  args[1] = "add"; 
    182180  args[2] = bw_req->slot_id; 
     
    198196  DP("Bandwidth: request %s", bw_req->slot_id); 
    199197 
    200   args[0] = BANDWIDTH_WRAPPER; 
     198  args[0] = RAHUNAS_BANDWIDTH_WRAPPER; 
    201199  args[1] = "del"; 
    202200  args[2] = bw_req->slot_id; 
  • src/rh-task-dbset.c

    r927d0c7 rbae014d  
    250250  char ds_name[] = PROGRAM; 
    251251  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;  
    253253  char ds_desc[] = "RahuNAS DB Set"; 
    254254 
  • src/rh-task-iptables.c

    raace70f rbae014d  
    1616#include "rh-task.h" 
    1717#include "rh-utils.h" 
    18  
    19 #define IPTABLES_WRAPPER "/etc/rahunas/firewall.sh" 
    2018 
    2119int iptables_exec(struct vserver *vs, char *const args[]) 
     
    7876  if (pid == 0) { 
    7977    // Child 
    80     execve(IPTABLES_WRAPPER, args, env); 
     78    execve(RAHUNAS_FIREWALL_WRAPPER, args, env); 
    8179  } else if (pid < 0) { 
    8280    // Fork error 
     
    113111  DP("IPTables: start"); 
    114112 
    115   args[0] = IPTABLES_WRAPPER; 
     113  args[0] = RAHUNAS_FIREWALL_WRAPPER; 
    116114  args[1] = "start-config"; 
    117115  args[2] = (char *) 0; 
     
    126124  DP("IPTables: stop"); 
    127125 
    128   args[0] = IPTABLES_WRAPPER; 
     126  args[0] = RAHUNAS_FIREWALL_WRAPPER; 
    129127  args[1] = "stop-config"; 
    130128  args[2] = (char *) 0; 
  • tools/rahunas-weblogin-config-update.in

    r03dc5e3 rbae014d  
    2323 
    2424# DB 
    25 RAHUNAS_DB=/etc/rahunas/rahunas.db 
     25RAHUNAS_DB=@localstatedir@/lib/rahunas/rahunas.db 
    2626SQLITE3=/usr/bin/sqlite3 
    2727 
  • xmlrpc/Makefile.am

    r4d5414b rbae014d  
    22 
    33@SET_MAKE@ 
     4 
     5MAINTAINERCLEANFILES = Makefile.in 
    46 
    57noinst_LIBRARIES = libgnetxmlrpc.a