4 # Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; version 2 of the License.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
21 test -e "$UTIL_VSERVER_VARS" || {
22 echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
25 . "$UTIL_VSERVER_VARS"
35 1 ... configuration error
36 2 ... some files were changed but errors occured on other ones
37 3 ... operation failed on every file
39 Report bugs to <$PACKAGE_BUGREPORT>."
43 function showVersion()
46 $"vprocunhide $PACKAGE_VERSION -- unhides /proc entries
47 This program is part of $PACKAGE_STRING
49 Copyright (C) 2004 Enrico Scholz
50 This program is free software; you may redistribute it under the terms of
51 the GNU General Public License. This program has absolutely no warranty."
56 while test -n "$1"; do
59 --version) showVersion;;
64 "$__CONFDIR"/.defaults/apps/vprocunhide/files \
65 "$__PKGLIBDEFAULTDIR"/vprocunhide-files
69 while read filename; do
74 (\~*) params=( --admin --watch --hide ); filename=${filename#\~};;
75 (-*) params=( --admin --hide ); filename=${filename#-};;
76 (:*) params=( --watch --hide ); filename=${filename#:};;
77 (!*) params=( --hide ); filename=${filename#!};;
78 (+*) params=( --!hide ); filename=${filename#+};;
79 (*) params=( --!hide );;
83 (*/) params=( "${params[@]}" -R );;
88 test -e "$1" || continue
90 $_SETATTR -x "${params[@]}" "$@" && passed=1 || ok=
93 test -n "$ok" && exit 0 || \
94 test -n "$passed" && exit 2 || \