Changeset 91e625a0f01031ada5a64b416624804aea5cd439
- Timestamp:
- 05/12/10 15:24:44
(3 years ago)
- Author:
- Mark Harrison <mark@omniti.com>
- git-committer:
- Mark Harrison <mark@omniti.com> 1273677884 +0000
- git-parent:
[ab637c1792a4b0a60d352968204b4b73999f7d99]
- git-author:
- Mark Harrison <mark@omniti.com> 1273677884 +0000
- Message:
Allow wildcard includes (e.g. INCLUDE conf/*.conf)
git-svn-id: https://labs.omniti.com/resmon/branches/resmon2@369 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r72ec062 |
r91e625a |
|
| 110 | 110 | next; |
|---|
| 111 | 111 | } elsif(/\s*INCLUDE\s+(\S+)\s*;\s*/) { |
|---|
| 112 | | my $incfilename = $1; |
|---|
| | 112 | my $incglob = $1; |
|---|
| | 113 | |
|---|
| | 114 | # Apply percent substitutions |
|---|
| 113 | 115 | my $HOSTNAME = hostname; # Uses Sys::Hostname |
|---|
| 114 | | $incfilename =~ s/%h/$HOSTNAME/g; |
|---|
| 115 | | $incfilename =~ s/%o/$^O/g; |
|---|
| 116 | | new($class, $incfilename, $self); |
|---|
| | 116 | $incglob =~ s/%h/$HOSTNAME/g; |
|---|
| | 117 | $incglob =~ s/%o/$^O/g; |
|---|
| | 118 | |
|---|
| | 119 | foreach my $incfilename (glob $incglob) { |
|---|
| | 120 | new($class, $incfilename, $self); |
|---|
| | 121 | } |
|---|
| 117 | 122 | } else { |
|---|
| 118 | 123 | die "Syntax Error in config file $filename on line $line\n"; |
|---|