summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-08-28 15:07:52 +0000
committerfukachan <fukachan>2002-08-28 15:07:52 +0000
commit77a10284e86fa6845ecd01f44d67382ff599442d (patch)
tree762dfdee8d795bc13a6bfcb092a84f5dd22754bf
parent224b61a0d5e08c09e77c0c317676ab0385dfbec1 (diff)
downloadfml8-77a10284e86fa6845ecd01f44d67382ff599442d.tar.gz
fml8-77a10284e86fa6845ecd01f44d67382ff599442d.tar.bz2
fml8-77a10284e86fa6845ecd01f44d67382ff599442d.zip
add a cheap diag: check the existence of $owner and $group
-rwxr-xr-xINSTALL.sh23
1 files changed, 22 insertions, 1 deletions
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