OpenWrt Forum Archive

Topic: "at" command?

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

    I just installed openwrt 10.03 onto a WRT54G that I had laying around.  Hope to use it as a firewall/router/vpn-endpoint at a remote site.  Traditionally, for such things I have used an old PC running Slackware.  The WRT54G will cost me less in electricity, and I won't have to go vacuum it out every six months.  Win-win.

   I am modifying my customary firewall to go on this machine.  Like most firewalls, it consists of a series of iptables commands.
So far, it seems to work.

   One thing the box seems to be missing is the "at" command.  When I mess with a firewall that is physically far away, I *always*
run a little script I call fixme:

--------- snip ------------
#!/bin/sh
at -f /etc/rc.d/rc.firewall.loose now + 5 minutes
--------- endsnip ---------

   So when I do something stupid with the firewall and lock myself out of that remote machine, it fixes itself 5 minutes later.
rc.firewall.loose basically flushes all the tables and sets the default policies to "ACCEPT" - really, no firewall at all.  It has saved
my behind numerous times.

  But openwrt doesn't seem to have an "at" command.  Anybody know where it is?   In general, how does one look for a file in the packages?

  Thanks in advance,

                                 - Jerry Kaidor

Whups, answered my own questions.  There's a package called "at".  So I just said
opkg update
opkg install at

....cool.

   To make it work, I had to create /var/spool/cron/atjobs directory
  and start an "atd" daemon.

                    - Jerry

...but it still doesn't really work.  The atd daemon immediately exits.


                       - Jerry Kaidor

...which is fixed by using the proper init script.  Good stuff.

                                - Jerry Kaidor

Thanks. I know it is a really old post, but was of help to me.

The init script actually creates all the missing directories. So all I needed to do was start the init script (/etc/init.d/atd start)

Thanks,
GN.

The discussion might have continued from here.