3 # Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; version 2 of the License.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
20 test -e "$UTIL_VSERVER_VARS" || {
21 echo $"Can not find util-vserver installation; aborting...">&2
24 . "$UTIL_VSERVER_VARS"
34 1 ... configuration error
35 2 ... some files where changes but there occured errors on other ones
36 3 ... operation failed on every file
38 Report bugs to <$PACKAGE_BUGREPORT>."
42 function showVersion()
45 $"vprocunhide $PACKAGE_VERSION -- unhides /proc entries
46 This program is part of $PACKAGE_STRING
48 Copyright (C) 2004 Enrico Scholz
49 This program is free software; you may redistribute it under the terms of
50 the GNU General Public License. This program has absolutely no warranty."
58 --version) showVersion;;
63 "$CONFDIR"/.defaults/apps/vprocunhide/files \
64 "$PKGLIBDEFAULTDIR"/vprocunhide-files
68 while read filename; do
73 (-*) params=( --admin --hide ); filename=${filename#-};;
74 (~*) params=( --admin --watch --hide ); filename=${filename#~};;
75 (:*) params=( --watch --hide ); filename=${filename#:};;
76 (!*) params=( --hide ); filename=${filename#!};;
77 (+*) params=( --!hide ); filename=${filename#+};;
78 (*) params=( --!hide );;
82 (*/) params=( "${params[@]}" -R );;
87 test -e "$1" || continue
89 $_SETATTR -x "${params[@]}" "$@" && passed=1 || ok=
92 test "$ok" && exit 0 || \
93 test "$passed" && exit 2 || \