--- /dev/null
+## svn propset svn:ignore -F .svnignore .
+*.iso
+*.md5
+*.tgz
+.config
+.svnignore
+build
+cache
+ccache
+packages
+svn_status
+log
usr/local/bin/qosctrl
usr/local/bin/rebuildhosts
usr/local/bin/redctrl
-usr/local/bin/restartapplejuice
-usr/local/bin/restartntpd
+#usr/local/bin/restartapplejuice
usr/local/bin/restartsnort
usr/local/bin/restartssh
usr/local/bin/restartsyslogd
usr/local/bin/setxtaccess
usr/local/bin/smartctrl
usr/local/bin/squidctrl
-usr/local/bin/timecheckctrl
+usr/local/bin/timectrl
usr/local/bin/upnpctrl
WARNING: translation string unused: modulation
WARNING: translation string unused: mount
WARNING: translation string unused: nat-traversal
+WARNING: translation string unused: net address
+WARNING: translation string unused: net config type
+WARNING: translation string unused: net config type help
WARNING: translation string unused: network configuration
WARNING: translation string unused: network status information
WARNING: translation string unused: new optionsfw later
WARNING: translation string unused: monthly firewallhits
WARNING: translation string unused: mount
WARNING: translation string unused: nat-traversal
+WARNING: translation string unused: net address
+WARNING: translation string unused: net config type
+WARNING: translation string unused: net config type help
WARNING: translation string unused: network configuration
WARNING: translation string unused: network status information
WARNING: translation string unused: new optionsfw later
if ($timesettings{'ENABLENTP'} eq 'on' && $timesettings{'VALID'} eq 'yes')
{
system ('/usr/bin/touch', "${General::swroot}/time/enable");
+ system ('/usr/local/bin/timectrl enable >/dev/null 2>&1');
&General::log($Lang::tr{'ntp syncro enabled'});
unlink "${General::swroot}/time/counter";
if ($timesettings{'UPDATE_METHOD'} eq 'periodically')
unlink "${General::swroot}/time/enable";
unlink "${General::swroot}/time/settimenow";
unlink "${General::swroot}/time/allowclients"; # DPC added to 1.3.1
+ system ('/usr/local/bin/timectrl disable >/dev/null 2>&1');
&General::log($Lang::tr{'ntp syncro disabled'})
}
if (! $errormessage) {
- system ('/usr/local/bin/restartntpd'); # DPC added to 1.3.1
+ system ('/usr/local/bin/timectrl restart >/dev/null 2>&1'); # DPC added to 1.3.1
}
}
if ($timesettings{'ACTION'} eq $Lang::tr{'set time now'} && $timesettings{'ENABLENTP'} eq 'on')
{
system ('/usr/bin/touch', "${General::swroot}/time/settimenow");
- system ('/usr/local/bin/timecheckctrl >& /dev/null');
+ system ('/usr/local/bin/timecheck >& /dev/null');
}
&General::readhash("${General::swroot}/time/settings", \%timesettings);
PROGS = iowrap
SUID_PROGS = setdmzholes setportfw setfilters setxtaccess \
squidctrl restartssh ipfirereboot setaliases \
- ipsecctrl restartntpd dhcpctrl restartsnort \
+ ipsecctrl timectrl dhcpctrl restartsnort \
restartapplejuice rebuildhosts \
- restartsyslogd logwatch openvpnctrl timecheckctrl \
+ restartsyslogd logwatch openvpnctrl \
restartwireless getipstat qosctrl launch-ether-wake \
redctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
smartctrl clamavctrl
clamavctrl: clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o
$(COMPILE) -I../install+setup/libsmooth/ clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
+
+timectrl: timectrl.c setuid.o ../install+setup/libsmooth/varval.o
+ $(COMPILE) -I../install+setup/libsmooth/ timectrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
launch-ether-wake: launch-ether-wake.c setuid.o ../install+setup/libsmooth/varval.o
$(COMPILE) -I../install+setup/libsmooth/ launch-ether-wake.c setuid.o ../install+setup/libsmooth/varval.o -o $@
ipsecctrl: ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o
$(COMPILE) -I../install+setup/libsmooth/ ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
-timecheckctrl: timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o
- $(COMPILE) -I../install+setup/libsmooth/ timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
-
getipstat: getipstat.c setuid.o ../install+setup/libsmooth/varval.o
$(COMPILE) -I../install+setup/libsmooth/ getipstat.c setuid.o ../install+setup/libsmooth/varval.o -o $@
+++ /dev/null
-/* IPFire helper program - restartntpd
- *
- * Starts or stops the ntpd daemon
- *
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "setuid.h"
-
-
-int main(void)
-{
- int fd = -1;
- int enable = 0;
-
- if (!(initsetuid()))
- exit(1);
-
- safe_system("/etc/rc.d/init.d/ntp stop 2>&1 >/dev/null");
- sleep(3);
-
- if ((fd = open(CONFIG_ROOT "/time/allowclients", O_RDONLY)) != -1)
- {
- close(fd);
- enable = 1;
- }
-
- if (enable)
- {
- safe_system("/etc/rc.d/init.d/ntp start 2>&1 >/dev/null");
- }
- return 0;
-}
+++ /dev/null
-/* SmoothWall helper program - smoothiedeath
- *
- * This program is distributed under the terms of the GNU General Public
- * Licence. See the file COPYING for details.
- *
- * (c) Lawrence Manning, 2001
- * Simple program intended to be installed setuid(0) that can be used for
- * starting shutdown.
- *
- * $Id: ipcopdeath.c,v 1.2 2003/12/11 10:57:34 riddles Exp $
- *
- */
-
-#include <stdlib.h>
-#include "setuid.h"
-
-int main(void)
-{
- if (!(initsetuid()))
- exit(1);
-
- safe_system("/usr/local/bin/timecheck");
-
- return 0;
-}
--- /dev/null
+/* This file is part of the IPFire Firewall.
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence. See the file COPYING for details.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include "setuid.h"
+
+int main(int argc, char *argv[]) {
+
+ if (!(initsetuid()))
+ exit(1);
+
+ if (argc < 2) {
+ fprintf(stderr, "\nNo argument given.\n\ntimectrl (start|stop|restart)\n\n");
+ exit(1);
+ }
+
+ if (strcmp(argv[1], "start") == 0) {
+ safe_system("/etc/rc.d/init.d/ntpd start");
+ } else if (strcmp(argv[1], "stop") == 0) {
+ safe_system("/etc/rc.d/init.d/ntpd stop");
+ } else if (strcmp(argv[1], "restart") == 0) {
+ safe_system("/etc/rc.d/init.d/ntpd restart");
+ } else if (strcmp(argv[1], "enable") == 0) {
+ safe_system("ln -fs ../init.d/ntpd /etc/rc.d/rc3.d/S26ntpd >/dev/null 2>&1");
+ safe_system("ln -fs ../init.d/ntpd /etc/rc.d/rc0.d/K46ntpd >/dev/null 2>&1");
+ safe_system("ln -fs ../init.d/ntpd /etc/rc.d/rc6.d/K46ntpd >/dev/null 2>&1");
+ safe_system("/etc/rc.d/init.d/ntpd start");
+ } else if (strcmp(argv[1], "disable") == 0) {
+ safe_system("/etc/rc.d/init.d/ntpd stop");
+ safe_system("rm -f /etc/rc.d/rc*.d/*ntpd >/dev/null 2>&1");
+ } else {
+ fprintf(stderr, "\nBad argument given.\n\ntimectrl (start|stop|restart)\n\n");
+ exit(1);
+ }
+
+ return 0;
+}