[augeas-devel] augeas: the tag release-0.1.0 has been created
David Lutterkort
lutter at fedoraproject.org
Fri Apr 17 21:44:39 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=7a3c15077ada431d70fc8237f0b5177f4f473073
Commit: 7a3c15077ada431d70fc8237f0b5177f4f473073
Parent: 90464320301f5ce13e8d6f13bb1211d22bd014fb
Author: Raphael Pinson <raphink at gmail.com>
AuthorDate: Mon Apr 13 10:29:56 2009 -0700
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Mon Apr 13 10:29:56 2009 -0700
Cron: add a "time" node
---
lenses/cron.aug | 10 ++++------
lenses/tests/test_cron.aug | 37 ++++++++++++++++++-------------------
2 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/lenses/cron.aug b/lenses/cron.aug
index 98e8cc9..56595f4 100644
--- a/lenses/cron.aug
+++ b/lenses/cron.aug
@@ -95,16 +95,14 @@ let dayofweek = [ label "dayofweek" . store alphanum ]
(* View: user *)
let user = [ label "user" . store Rx.word ]
-(* View: command *)
-let command = [ label "command" . store Rx.space_in ]
-
(************************************************************************
* View: time
* Time in the format "minute hour dayofmonth month dayofweek"
*************************************************************************)
-let time = minute . sep_spc . hour . sep_spc . dayofmonth
- . sep_spc . month . sep_spc . dayofweek
+let time = [ label "time" .
+ minute . sep_spc . hour . sep_spc . dayofmonth
+ . sep_spc . month . sep_spc . dayofweek ]
(* Variable: the valid values for schedules *)
let schedule_re = "reboot" | "yearly" | "annually" | "monthly"
@@ -126,7 +124,7 @@ let schedule = [ label "schedule" . Util.del_str "@"
let entry = [ label "entry" . indent
. ( time | schedule )
. sep_spc . user
- . sep_spc . command . eol ]
+ . sep_spc . store Rx.space_in . eol ]
(*
diff --git a/lenses/tests/test_cron.aug b/lenses/tests/test_cron.aug
index b4d380f..56d4070 100644
--- a/lenses/tests/test_cron.aug
+++ b/lenses/tests/test_cron.aug
@@ -16,24 +16,23 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
{ "SHELL" = "/bin/sh" }
{ "PATH" = "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" }
{}
- { "entry"
- { "minute" = "30" }
- { "hour" = "7" }
- { "dayofmonth" = "*" }
- { "month" = "*" }
- { "dayofweek" = "*" }
- { "user" = "root" }
- { "command" = "test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null" } }
- { "entry"
- { "minute" = "00" }
- { "hour" = "*/3" }
- { "dayofmonth" = "15-25/2" }
- { "month" = "May" }
- { "dayofweek" = "1-5" }
- { "user" = "user" }
- { "command" = "somecommand" } }
+ { "entry" = "test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null"
+ { "time"
+ { "minute" = "30" }
+ { "hour" = "7" }
+ { "dayofmonth" = "*" }
+ { "month" = "*" }
+ { "dayofweek" = "*" } }
+ { "user" = "root" } }
+ { "entry" = "somecommand"
+ { "time"
+ { "minute" = "00" }
+ { "hour" = "*/3" }
+ { "dayofmonth" = "15-25/2" }
+ { "month" = "May" }
+ { "dayofweek" = "1-5" } }
+ { "user" = "user" } }
{ "#comment" = "a comment" }
- { "entry"
+ { "entry" = "a command"
{ "schedule" = "yearly" }
- { "user" = "foo" }
- { "command" = "a command" } }
+ { "user" = "foo" } }
More information about the augeas-devel
mailing list