From 77a10284e86fa6845ecd01f44d67382ff599442d Mon Sep 17 00:00:00 2001 From: fukachan Date: Wed, 28 Aug 2002 15:07:52 +0000 Subject: add a cheap diag: check the existence of $owner and $group --- INSTALL.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/INSTALL.sh b/INSTALL.sh index 222c7831..428fdbf5 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: INSTALL.sh,v 1.53 2002/07/12 15:06:33 fukachan Exp $ +# $FML: INSTALL.sh,v 1.54 2002/07/28 03:41:00 fukachan Exp $ # # Run this from the top-level fml source directory. @@ -34,6 +34,27 @@ _mkdir () { # configurations generated by ./configure . ./config.sh + +# cheap diag: check the existence of $owner and $group +is_owner=1 +is_group=1 +id $owner >/dev/null || is_owner=0 +id -p $owner |\ +egrep '^groups' |\ +egrep -e "${group}" >/dev/null || is_group=0 + +if [ $is_owner = 0 ];then + echo warning: no such user $owner + exit 1 +fi + +if [ $is_group = 0 ];then + echo warning: no such group $group + exit 1 +fi + + +# init get_fml_version default_config_dir=$config_dir/defaults/$fml_version -- cgit v1.2.1