mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Add binary "rebuildroutes" to setup routes from the webif.
This commit is contained in:
@@ -18,6 +18,7 @@ usr/local/bin/outgoingfwctrl
|
|||||||
usr/local/bin/pakfire
|
usr/local/bin/pakfire
|
||||||
usr/local/bin/qosctrl
|
usr/local/bin/qosctrl
|
||||||
usr/local/bin/rebuildhosts
|
usr/local/bin/rebuildhosts
|
||||||
|
usr/local/bin/rebuildroutes
|
||||||
usr/local/bin/redctrl
|
usr/local/bin/redctrl
|
||||||
#usr/local/bin/sambactrl
|
#usr/local/bin/sambactrl
|
||||||
usr/local/bin/setaliases
|
usr/local/bin/setaliases
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ SUID_PROGS = setdmzholes setportfw setxtaccess \
|
|||||||
wirelessctrl getipstat getiptstate qosctrl launch-ether-wake \
|
wirelessctrl getipstat getiptstate qosctrl launch-ether-wake \
|
||||||
redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
|
redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
|
||||||
smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
|
smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
|
||||||
setaliases urlfilterctrl updxlratorctrl fireinfoctrl
|
setaliases urlfilterctrl updxlratorctrl fireinfoctrl rebuildroutes
|
||||||
SUID_UPDX = updxsetperms
|
SUID_UPDX = updxsetperms
|
||||||
|
|
||||||
install : all
|
install : all
|
||||||
@@ -158,3 +158,5 @@ updxsetperms: updxsetperms.c setuid.o ../install+setup/libsmooth/varval.o
|
|||||||
fireinfoctrl: fireinfoctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
fireinfoctrl: fireinfoctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||||
$(COMPILE) -I../install+setup/libsmooth/ fireinfoctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
$(COMPILE) -I../install+setup/libsmooth/ fireinfoctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||||
|
|
||||||
|
rebuildroutes: rebuildroutes.c setuid.o ../install+setup/libsmooth/varval.o
|
||||||
|
$(COMPILE) -I../install+setup/libsmooth/ rebuildroutes.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||||
|
|||||||
17
src/misc-progs/rebuildroutes.c
Normal file
17
src/misc-progs/rebuildroutes.c
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/* IPFire helper program - rebuildroutes
|
||||||
|
*
|
||||||
|
* This program is distributed under the terms of the GNU General Public
|
||||||
|
* Licence. See the file COPYING for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "libsmooth.h"
|
||||||
|
#include "setuid.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
if (!(initsetuid()))
|
||||||
|
exit(1);
|
||||||
|
|
||||||
|
safe_system("/etc/init.d/static-routes start >/dev/null 2>&1");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user