[freeside-commits] freeside/install/rpm freeside-install, 1.1.4.2, 1.1.4.3
Richard Siddall
rsiddall at wavetail.420.am
Wed Nov 7 15:02:48 PST 2007
Update of /home/cvs/cvsroot/freeside/install/rpm
In directory wavetail:/tmp/cvs-serv14027
Modified Files:
Tag: FREESIDE_1_7_BRANCH
freeside-install
Log Message:
Fixed up the tests to work on CentOS 4. Not sure if this is portable.
Index: freeside-install
===================================================================
RCS file: /home/cvs/cvsroot/freeside/install/rpm/Attic/freeside-install,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- freeside-install 8 Jul 2007 03:37:03 -0000 1.1.4.2
+++ freeside-install 7 Nov 2007 23:02:45 -0000 1.1.4.3
@@ -20,7 +20,7 @@
case $flag in
d)
NEWVAL=`echo $OPTARG | tr '[A-Z]' '[a-z]'`
- if [ "x$DOMAIN" -ne "x" ] ; then
+ if [ "x$DOMAIN" != "x" -a "$DOMAIN" != "$NEWVAL" ] ; then
echo STDERR "Domain already set to $DOMAIN. Changing to $NEWVAL"
fi
DOMAIN=$NEWVAL;;
@@ -28,19 +28,19 @@
usage;;
n)
# We don't lowercase the database name
- if [ "x$DBNAME" -ne "x" ] ; then
+ if [ "x$DBNAME" != "x" -a "$DBNAME" != "$OPTARG" ] ; then
echo STDERR "Database name already set to $DBNAME. Changing to $OPTARG"
fi
DBNAME=$OPTARG;;
p)
NEWVAL=`echo $OPTARG | tr '[A-Z]' '[a-z]'`
- if [ "x$PACKAGER" -ne "x" ] ; then
+ if [ "x$PACKAGER" != "x" -a "$PACKAGER" != "$NEWVAL" ] ; then
echo STDERR "Packager already set to $PACKAGER. Changing to $NEWVAL"
fi
PACKAGER=$NEWVAL;;
u)
# We don't lowercase the user name
- if [ "x$USER" -ne "x" ] ; then
+ if [ "x$USER" != "x" -a "$USER" != "$OPTARG" ] ; then
echo STDERR "Main freeside web user already set to $USER. Changing to $OPTARG"
fi
USER=$OPTARG;;
@@ -187,7 +187,11 @@
{
echo "Creating first Freeside application user"
su freeside -c "freeside-adduser -g 1 $USER"
- su freeside -c "htpasswd -c /usr/local/etc/freeside/htpasswd $USER"
+ if [ $PACKAGER != "rpm" ]; then
+ su freeside -c "htpasswd -c /usr/local/etc/freeside/htpasswd $USER"
+ else
+ su freeside -c "htpasswd -c /etc/freeside/htpasswd $USER"
+ fi
}
setup_freeside_database()
@@ -208,7 +212,7 @@
usage;
fi
-if [ "$PACKAGER" -ne "rpm" ]; then
+if [ "$PACKAGER" != "rpm" ]; then
install_all_perl_modules;
install_freeside;
fi
@@ -221,7 +225,9 @@
add_freeside_system_users;
-add_first_freeside_user;
+if [ "x$USER" != "x" ]; then
+ add_first_freeside_user;
+fi
exit 0;
More information about the freeside-commits
mailing list