ossp-pkg/rc/rc.example 1.4 -> 1.5
--- rc.example 2002/01/31 16:31:24 1.4
+++ rc.example 2002/01/31 16:38:01 1.5
@@ -44,6 +44,20 @@
%status -c /usr/bin/perl
print STDERR "Sftpd status report";
for ...
+
+%error # We have a rc (not user-level) error
+# Very rough representation of built-in rc language
+ +syslogit DAEMON CRITICAL;
+ +if ${sftpd_error}
+ +outconsole ${sftpd_error};
+ +outconsole "Runcommand-level error in line ";
+ +lineno SCRIPT; # Not +lineno ABSOLUTE;
+ +outconsole " of rcfile ";
+ +rcfilename;
+
+%default # Gets hit if no other section label matches
+ $HOME/bin/popup "Missing section in rc.sftpd!" # Run custom app
+ @error # Reference to error section
# End stock syntax example rcfile
@@ -75,6 +89,20 @@
!printstat -c /usr/bin/perl
print STDERR "Sftpd status report";
for ...
+
+!problem # We have a rc (not user-level) error
+# Very rough representation of built-in rc language
+ +syslogit DAEMON CRITICAL;
+ +if ${sftpd_error}
+ +outconsole ${sftpd_error};
+ +outconsole "Runcommand-level error in line ";
+ +lineno SCRIPT; # Not +lineno ABSOLUTE;
+ +outconsole " of rcfile ";
+ +rcfilename;
+
+!missing # Gets hit if no other section label matches
+ $HOME/bin/popup "Missing section in rc.sftpd!" # Run custom app
+ @error # Reference to error section
# End custom syntax example rcfile
@@ -113,6 +141,22 @@
print STDERR "Sftpd status report";
for ...
</status>
+
+<error> # We have a rc (not user-level) error
+# Very rough representation of built-in rc language
+ +syslogit DAEMON CRITICAL;
+ +if ${sftpd_error}
+ +outconsole ${sftpd_error};
+ +outconsole "Runcommand-level error in line ";
+ +lineno SCRIPT; # Not +lineno ABSOLUTE;
+ +outconsole " of rcfile ";
+ +rcfilename;
+</error>
+
+<default> # Gets hit if no other section label matches
+ $HOME/bin/popup "Missing section in rc.sftpd!" # Run custom app
+ <refer name=error> # Reference to error section
+</default>
# End XML-like syntax example rcfile
@@ -171,4 +215,22 @@
print STDERR "Sftpd status report";
for ...
END
+
+error ERROR # We have a rc (not user-level) error
+# Very rough representation of built-in rc language
+ BEGIN
+ +syslogit DAEMON CRITICAL;
+ +if ${sftpd_error}
+ +outconsole ${sftpd_error};
+ +outconsole "Runcommand-level error in line ";
+ +lineno SCRIPT; # Not +lineno ABSOLUTE;
+ +outconsole " of rcfile ";
+ +rcfilename;
+ END
+
+default DEFAULT # Gets hit if no other section label matches
+ BEGIN
+ $HOME/bin/popup "Missing section in rc.sftpd!" # Run custom app
+ error REFER # Reference to error section
+ END
# End ASN.1-like syntax example rcfile
|
|