cat ${pg_hba_dir}/pg_hba.conf >> $newpg
mv $newpg ${pg_hba_dir}/pg_hba.conf
chmod 644 ${pg_hba_dir}/pg_hba.conf
- invoke-rc.d ${pg_name} restart
+
+ # Trying "postgresql" init script...
+ invoke-rc.d postgresql restart || v=$?
+ if test x"$v" = x"100"; then
+ # No "postgresql" init script (for packages << 8.4.4-2)
+ pg_name=postgresql-$pg_version
+ invoke-rc.d ${pg_name} restart
+ elif test x"$v" != x"0"; then
+ # Needed, since we run under "set -e"...
+ exit $v
+ fi
+
if [ "x$2" != "x" ] ;then
RESTFILE=$2
else
su -s /bin/sh postgres -c "/usr/bin/psql -f $RESTFILE $db_name"
perl -pi -e "s/### Next line inserted by GForge restore\n//" ${pg_hba_dir}/pg_hba.conf
perl -pi -e "s/$localtrust\n//" ${pg_hba_dir}/pg_hba.conf
- invoke-rc.d ${pg_name} reload
+
+ # Trying "postgresql" init script...
+ invoke-rc.d postgresql reload || v=$?
+ if test x"$v" = x"100"; then
+ # No "postgresql" init script (for packages << 8.4.4-2)
+ pg_name=postgresql-$pg_version
+ invoke-rc.d ${pg_name} reload
+ elif test x"$v" != x"0"; then
+ # Needed, since we run under "set -e"...
+ exit $v
+ fi
;;
esac
# Make sure the database accepts connections from these new users
pg_name=postgresql-$pg_version
- invoke-rc.d ${pg_name} reload
+ # Trying "postgresql" init script...
+ invoke-rc.d postgresql reload || v=$?
+ if test x"$v" = x"100"; then
+ # No "postgresql" init script (for packages << 8.4.4-2)
+ pg_name=postgresql-$pg_version
+ invoke-rc.d ${pg_name} reload
+ elif test x"$v" != x"0"; then
+ # Needed, since we run under "set -e"...
+ exit $v
+ fi
# Setup our DB
/usr/share/@OLDPACKAGE@/bin/install-db.sh configure
ucf --purge ${pg_hba_dir}/pg_hba.conf
pg_name=postgresql-$pg_version
- invoke-rc.d ${pg_name} reload
+ # Trying "postgresql" init script...
+ invoke-rc.d postgresql reload || v=$?
+ if test x"$v" = x"100"; then
+ # No "postgresql" init script (for packages << 8.4.4-2)
+ pg_name=postgresql-$pg_version
+ invoke-rc.d ${pg_name} reload
+ elif test x"$v" != x"0"; then
+ # Needed, since we run under "set -e"...
+ exit $v
+ fi
;;
upgrade|deconfigure|failed-upgrade)
;;
in-target chsh -s /bin/zsh ; \
in-target chmod o+rw /dev/null ; \
apt-install postgresql-8.4; \
-chroot /target invoke-rc.d postgresql-8.4 start ; \
+chroot /target sh -c 'invoke-rc.d postgresql start || invoke-rc.d postgresql-8.4 start' ; \
UCF_FORCE_CONFFNEW=yes apt-install fusionforge-full fusionforge-plugin-forumml ; \
in-target ln -s /var/lib/gforge/chroot/scmrepo/cvs /cvsroot ; \
in-target ln -s /var/lib/gforge/chroot/scmrepo/svn /svnroot ; \