192 |
- |
1 |
#!/bin/sh
|
|
|
2 |
##########################################################
|
|
|
3 |
# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
|
|
|
4 |
#
|
|
|
5 |
# This program is free software; you can redistribute it and/or modify it
|
|
|
6 |
# under the terms of the GNU Lesser General Public License as published
|
|
|
7 |
# by the Free Software Foundation version 2.1 and no later version.
|
|
|
8 |
#
|
|
|
9 |
# This program is distributed in the hope that it will be useful, but
|
|
|
10 |
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
11 |
# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
|
|
|
12 |
# License for more details.
|
|
|
13 |
#
|
|
|
14 |
# You should have received a copy of the GNU Lesser General Public License
|
|
|
15 |
# along with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
16 |
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
17 |
#
|
|
|
18 |
##########################################################
|
|
|
19 |
|
|
|
20 |
##########################################################################
|
|
|
21 |
# DO NOT modify this file directly as it will be overwritten the next
|
|
|
22 |
# time the VMware Tools are installed.
|
|
|
23 |
##########################################################################
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
#
|
|
|
27 |
# Panic --
|
|
|
28 |
#
|
|
|
29 |
# Write a formatted error message to stderr and exit.
|
|
|
30 |
#
|
|
|
31 |
# Results:
|
|
|
32 |
# Stderr is spammed, program exits with exit code 1.
|
|
|
33 |
#
|
|
|
34 |
# Side effects:
|
|
|
35 |
# None.
|
|
|
36 |
#
|
|
|
37 |
|
|
|
38 |
Panic() {
|
|
|
39 |
fmt="`date '+%b %d %H:%M:%S'` `basename \"$0\"`"
|
|
|
40 |
if [ -n "$1" ]; then
|
|
|
41 |
fmt="${fmt}: $1"
|
|
|
42 |
shift
|
|
|
43 |
fi
|
|
|
44 |
|
|
|
45 |
printf >&2 "${fmt}\n" "$@"
|
|
|
46 |
exit 1
|
|
|
47 |
}
|