Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
bfcf7150
Commit
bfcf7150
authored
Mar 04, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a default message, pass -m - to use that instead of having to
type one.
parent
7c936c1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
db/webcontrol.in
db/webcontrol.in
+8
-2
No files found.
db/webcontrol.in
View file @
bfcf7150
#!/usr/bin/perl -w
#
# Copyright (c) 2000-20
03, 2007
University of Utah and the Flux Group.
# Copyright (c) 2000-20
16
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -30,7 +30,8 @@ use Getopt::Std;
#
sub
usage
()
{
print
STDOUT
"
Usage: webcontrol [-m message] [-l login | nologin]
\n
";
print
STDOUT
"
Usage: webcontrol [-m message | -] [-l login | nologin]
\n
";
print
STDOUT
"
Specify '-' for the message, to use the default message
\n
";
exit
(
-
1
);
}
my
$optlist
=
"
m:l:
";
...
...
@@ -42,6 +43,8 @@ use lib "@prefix@/lib";
use
libdb
;
my
$TBROOT
=
"
@prefix
@
";
my
$DEFMESSAGE
=
"
Testbed going offline for maintenance;
"
.
"
back in a little while
";
# Untaint the path
$ENV
{'
PATH
'}
=
"
/usr/bin:
$TBROOT
/libexec:
$TBROOT
/sbin:
$TBROOT
/bin
";
...
...
@@ -67,6 +70,9 @@ my $message = "";
if
(
defined
(
$options
{"
m
"}))
{
$setmesg
=
1
;
$message
=
$options
{"
m
"};
if
(
$message
eq
"
-
")
{
$message
=
$DEFMESSAGE
;
}
}
my
$setlogin
=
0
;
my
$logins
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment