From bb20db8e8760000402af72583770a4683ef79693 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Wed, 10 Jul 2002 23:15:43 +0000 Subject: - SuSE 8 - related changes - RPM - related changes - sisinstall: Correct shutdown of newt if an error occurs. --- Makefile.am | 20 +-------- configure.in | 14 +++++- etc/.cvsignore | 2 +- etc/plptools.spec.in | 101 ++++++++++++++++++++++++++++++++++++++++--- etc/psion.SuSE.in | 40 ++++++++++++----- etc/psion.SuSE8.in | 105 +++++++++++++++++++++++++++++++++++++++++++++ etc/psion.in | 38 +++++++++++----- kde2/doc/de/Makefile.am | 2 +- kde2/kioslave/Makefile.am | 2 +- kde2/klipsi/Makefile.am | 2 +- kde2/klipsi/klipsi.desktop | 1 - kde2/kpsion/Makefile.am | 2 +- kde2/plugins/Makefile.am | 2 +- plpprint/Makefile.am | 2 + plpprint/plpprintd.cc | 2 +- po/de.po | 34 ++++++++++----- po/sv.po | 33 +++++++++----- sisinstall/sismain.cpp | 28 ++++++++++-- 18 files changed, 350 insertions(+), 80 deletions(-) create mode 100755 etc/psion.SuSE8.in diff --git a/Makefile.am b/Makefile.am index 2696133..b6d7a94 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,25 +29,7 @@ maintainer-clean-local: # Suse doesn't have chkconfig, so we need to create the symlinks here. install-data-local: - if [ -f /etc/SuSE-release ] ; then \ - install -m 755 etc/psion.SuSE $(DESTDIR)/etc/rc.d/init.d/psion ;\ - ln -s ../psion /etc/rc.d/rc2.d/S45psion ;\ - ln -s ../psion /etc/rc.d/rc3.d/S45psion ;\ - ln -s ../psion /etc/rc.d/rc4.d/S45psion ;\ - ln -s ../psion /etc/rc.d/rc5.d/S45psion ;\ - ln -s ../psion /etc/rc.d/rc1.d/K70psion ;\ - ln -s ../psion /etc/rc.d/rc0.d/K70psion ;\ - ln -s ../psion /etc/rc.d/rc6.d/K70psion ;\ - grep -v START_PSION /etc/rc.config > /etc/rc.config.psion ;\ - ( \ - echo '# Set START_PSION to yes to start Psion support' ;\ - echo 'START_PSION=yes' ;\ - ) >> /etc/rc.config.psion ;\ - cp /etc/rc.config /etc/rc.config.old ;\ - mv /etc/rc.config.psion /etc/rc.config ;\ - else \ - install -m 755 etc/psion $(DESTDIR)/etc/rc.d/init.d/psion ;\ - fi + install -m 755 etc/psion $(DESTDIR)$(initdir)/psion dist-hook: $(MAKE) TMPDEST=$(distdir)/ kdoc specfile diff --git a/configure.in b/configure.in index 86d4740..7ac1775 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_CONFIG_AUX_DIR(conf) AC_AIX AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(include/config.h) -AM_INIT_AUTOMAKE(plptools, 0.10) +AM_INIT_AUTOMAKE(plptools, 0.11) AM_PROG_LIBTOOL PLP_SET_LIBVERSION @@ -257,6 +257,16 @@ test "x$prefix" = xNONE && prefix="$ac_default_prefix" eval PKGDATA="${datadir}/${PACKAGE}" AC_DEFINE_UNQUOTED(PKGDATA,"$PKGDATA",[This defines the dir for support files]) +AC_ARG_WITH(initdir, + [ --with-initdir=DIR override default init dir [/etc/rc.d/init.d]], + [ initdir="$withval" + AC_MSG_RESULT(Overriding initdir: $initdir) ], + [ initdir="/etc/rc.d/init.d" + AC_MSG_RESULT(Using default init dir: $initdir) + ] +) +AC_SUBST(initdir) + dnl KDE stuff PLP_HELP_MSG([Options for activating sub packages:]) ac_enable_kde=no @@ -330,6 +340,8 @@ AC_OUTPUT( doc/Makefile doc/api/Makefile etc/psion + etc/psion.SuSE + etc/psion.SuSE8 etc/plptools.spec doc/ncpd.man doc/plpnfsd.man diff --git a/etc/.cvsignore b/etc/.cvsignore index a7bfa17..7b89311 100644 --- a/etc/.cvsignore +++ b/etc/.cvsignore @@ -1,3 +1,3 @@ psion -psion.SuSE +psion.SuSE* plptools.spec diff --git a/etc/plptools.spec.in b/etc/plptools.spec.in index 05603cb..196f34c 100644 --- a/etc/plptools.spec.in +++ b/etc/plptools.spec.in @@ -1,3 +1,21 @@ +%define srel /etc/SuSE-release +%define rrel /etc/redhat-release +%define isSUSE %(test -f %{srel} && echo 1 || echo 0) +%define isRH %(test -f %{rrel} && echo 1 || echo 0) + +%if "%{isSUSE}" > "0" +%define REL %(grep VERSION %{srel} | sed -e 's/VERSION = //') +%if "%{REL}" >= "8.0" +# Bug in SuSE8.0's rpm setup: _initrddir has wrong value +%_initrddir %{_sysconfdir}/init.d +%else +%_initrddir %{_sysconfdir}/init.d +%endif +%endif +%if "%{isRH}" > "0" +%define REL %(rpm -q --queryformat '%%{version}' redhat-release) +%endif + Summary: Connectivity for psion series 5. Name: plptools %define version @VERSION@ @@ -10,7 +28,7 @@ Source0: http://download.sourceforge.net/plptools/plptools-%{version}.tar.gz Copyright: GPL Group: Networking/Utilities Requires: chkconfig >= 0.9 -Buildrequires: readline-devel kdelibs-devel >= 2.1 qt-devel >= 2.2.4 +Buildrequires: readline-devel newt-devel kdelibs-devel >= 2.1 qt-devel >= 2.2.4 BuildRoot: /tmp/plputils-buildroot %package devel @@ -125,14 +143,48 @@ zwischen Psion und Rechner. %setup -q %build -%configure --enable-kde +%if "%{isSUSE}" > "0" +%if "%{REL}" >= "8.0" +%configure --enable-kde --with-initdir=%{_initrddir} --with-kdedir=/opt/kde3 +%else +%configure --enable-kde --with-initdir=%{_initrddir} --with-kdedir=/opt/kde2 +%endif +%endif +%if "%{isRH}" > "0" +%configure --enable-kde --with-initdir=%{_initrddir} +%endif make %install -mkdir -p $RPM_BUILD_ROOT/usr $RPM_BUILD_ROOT/etc/rc.d/init.d +mkdir -p $RPM_BUILD_ROOT/%{_prefix} $RPM_BUILD_ROOT%{_initrddir} \ # rpm's makeinstall doesn't work here! make DESTDIR=$RPM_BUILD_ROOT install -install -m755 etc/psion $RPM_BUILD_ROOT/etc/rc.d/init.d +%if "%{isSUSE}" > "0" +%if "%{REL}" >= "8.0" +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +cat>$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/psion< "0" +install -m755 etc/psion $RPM_BUILD_ROOT%{_initrddir}/psion +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +cat>$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/psion< "0" /sbin/chkconfig --add psion -/etc/rc.d/init.d/psion condrestart +%endif +%if "%{isSUSE}" > "0" +%if "%{REL}" >= "8.0" +/sbin/chkconfig --add psion +%else +( + grep -v START_PSION /etc/rc.config + echo '# Set START_PSION to yes to start Psion support' + echo 'START_PSION=yes' +) > /etc/rc.config.$$ +cp /etc/rc.config /etc/rc.config.old && mv /etc/rc.config.$$ /etc/rc.config +/sbin/insserv -d psion +%endif +%endif +%{_initrddir}/psion condrestart KONQRC=`kde-config --expandvars --install config`/konquerorrc if grep -q '\[Notification Messages\]' $KONQRC ; then ( @@ -161,20 +228,39 @@ fi %preun if [ "$1" = 0 ] then - /etc/rc.d/init.d/psion stop >&2 + %{_initrddir}/psion stop >/dev/null 2>&1 +%if "%{isSUSE}" > "0" +%if "%{REL}" >= "8.0" + /sbin/chkconfig --del psion +%else + /sbin/insserv -r -d psion +%endif +%endif +%if "%{isRH}" > "0" /sbin/chkconfig --del psion +%endif fi %files %doc COPYING INSTALL CHANGES README* TODO etc/*magic patches %{_bindir}/plpftp %{_bindir}/plpbackup +%{_bindir}/sisinstall %{_sbindir}/* %{_mandir}/*/* %{_libdir}/libplp.so* %{_libdir}/libplp.la %{_datadir}/locale/*/LC_MESSAGES/plptools.mo -%config /etc/rc.d/init.d/psion +%{_datadir}/%{name}/* +%config %{_initrddir}/psion +%if "%{isSUSE}" > "0" +%if "%{REL}" >= "8.0" +%{_sysconfdir}/sysconfig/psion +%endif +%endif +%if "%{isRH}" > "0" +%{_sysconfdir}/sysconfig/psion +%endif %files devel %doc doc/api etc/*.spec @@ -206,6 +292,7 @@ fi %files -n klipsi %{_bindir}/klipsi %{_libdir}/klipsi.* +%{_datadir}/applnk/*/klipsi* %{_datadir}/apps/klipsi/* %{_datadir}/icons/*/*/apps/klipsi* %{_datadir}/icons/*/*/actions/klipsi* diff --git a/etc/psion.SuSE.in b/etc/psion.SuSE.in index 0e7c504..077244d 100755 --- a/etc/psion.SuSE.in +++ b/etc/psion.SuSE.in @@ -32,13 +32,23 @@ start() { exit 0 fi echo -n "Starting Psion support (ncpd): " - /sbin/startproc @prefix@/sbin/ncpd + /sbin/startproc @prefix@/sbin/ncpd $NCPD_ARGS RETVAL=$? - if [ $RETVAL -eq 0 ] ; then - echo -e "$return" - echo -n "Starting Psion support (plpnfsd): " - /sbin/startproc @prefix@/sbin/plpnfsd - RETVAL=$? + if test "$START_PLPNFSD" = "yes" ; then + if [ $RETVAL -eq 0 ] ; then + echo -e "$return" + echo -n "Starting Psion support (plpnfsd): " + /sbin/startproc @prefix@/sbin/plpnfsd $PLPNFSD_ARGS + RETVAL=$? + fi + fi + if test "$START_PLPPRINTD" = "yes" ; then + if [ $RETVAL -eq 0 ] ; then + echo -e "$return" + echo -n "Starting Psion support (plpprintd): " + /sbin/startproc @prefix@/sbin/plpprintd $PLPPRINTD_ARGS + RETVAL=$? + fi fi test $RETVAL -eq 0 || return=$rc_failed echo -e "$return" @@ -47,11 +57,19 @@ start() { stop() { echo -n "Stopping Psion support: " - /bin/killproc -HUP plpnfsd - while true ; do - test -z "`pidof plpnfsd`" && break; - sleep 1 # allow plpnfsd flushing it's cache - done + if test "$START_PLPNFSD" = "yes" ; then + /bin/killproc -HUP plpnfsd + WAIT=5 + while test $WAIT -gt 0 ; do + test -z "`pidof plpnfsd`" && break; + sleep 1 # allow plpnfsd flushing it's cache + WAIT=`expr $WAIT - 1` + done + test -n "`pidof plpnfsd`" && killproc plpnfsd + fi + if test "$START_PLPPRINTD" = "yes" ; then + /sbin/killproc -TERM plpprintd + fi /sbin/killproc -TERM ncpd RETVAL=$? test $RETVAL -eq 0 || return=$rc_failed diff --git a/etc/psion.SuSE8.in b/etc/psion.SuSE8.in new file mode 100755 index 0000000..e3f620e --- /dev/null +++ b/etc/psion.SuSE8.in @@ -0,0 +1,105 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: psion +# Required-Start: $syslog +# Required-Stop: +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Description: Start Psion support +### END INIT INFO + +# Source function library. +. /etc/rc.status + +[ -f @prefix@/sbin/ncpd ] || exit 0 +[ -f @prefix@/sbin/plpnfsd ] || exit 0 +[ -f @prefix@/sbin/plpprintd ] || exit 0 +[ -f /etc/sysconfig/psion ] || exit 0 +. /etc/sysconfig/psion + +MGETTY_HASPLP=false + +if grep -qs ^/PLP/ /etc/mgetty+sendfax/login.config ; then + mrun=`pidofproc mgetty` + test -n "$mrun" && MGETTY_HASPLP=true +fi + +rc_reset + +start() { + if $MGETTY_HASPLP ; then + echo "NOT Starting ncpd because mgetty configured for PLP" + exit 0 + fi + echo -n "Starting Psion support (ncpd): " + startproc -f @prefix@/sbin/ncpd $NCPD_ARGS + if rc_status -v ; then + if [ "$START_PLPNFSD" = "yes" ] ; then + echo -n "Starting Psion support (plpnfsd): " + startproc -f @prefix@/sbin/plpnfsd $PLPNFSD_ARGS + rc_status -v + fi + if [ "$START_PLPPRINTD" = "yes" ] ; then + echo -n "Starting Psion support (plpprintd): " + startproc -f @prefix@/sbin/plpprintd $PLPPRINTD_ARGS + rc_status -v + fi + fi + rc_status && touch /var/lock/subsys/psion +} + +stop() { + echo -n "Stopping Psion support: " + if [ "$START_PLPNFSD" = "yes" ] ; then + killproc -HUP @prefix@/sbin/plpnfsd + WAIT=5 + while test $WAIT -gt 0 ; do + test -z "`pidofproc plpnfsd`" && break; + sleep 1 # allow plpnfsd flushing it's cache + WAIT=`expr $WAIT - 1` + done + test -n "`pidofproc plpnfsd`" && \ + killproc -TERM @prefix@/sbin/plpnfsd + rc_status + fi + if [ "$START_PLPPRINTD" = "yes" ] ; then + killproc -TERM @prefix@/sbin/plpprintd + rc_status + fi + killproc -TERM @prefix@/sbin/ncpd + rc_status -v && rm -f /var/lock/subsys/psion +} + +restart() { + stop + start +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + echo -n "Checking for service psion: " + checkproc @prefix@/sbin/plpnfsd && \ + checkproc @prefix@/sbin/plpprintd && \ + checkproc @prefix@/sbin/ncpd + rc_status -v + ;; + restart|reload) + restart + ;; + condrestart) + test -f /var/lock/subsys/psion && restart || : + ;; + *) + echo "Usage: psion {start|stop|status|restart|reload|condrestart}" + exit 1 +esac + +rc_exit diff --git a/etc/psion.in b/etc/psion.in index 73a6bfb..3c7cf56 100755 --- a/etc/psion.in +++ b/etc/psion.in @@ -10,6 +10,8 @@ [ -f @prefix@/sbin/ncpd ] || exit 0 [ -f @prefix@/sbin/plpnfsd ] || exit 0 +[ -f /etc/sysconfig/psion ] || exit 0 +. /etc/sysconfig/psion MGETTY_HASPLP=false @@ -24,14 +26,22 @@ start() { exit 0 fi echo -n "Starting Psion support (ncpd): " - daemon @prefix@/sbin/ncpd + daemon @prefix@/sbin/ncpd $NCPD_ARGS RETVAL=$? echo if [ $RETVAL -eq 0 ] ; then - echo -n "Starting Psion support (plpnfsd): " - daemon @prefix@/sbin/plpnfsd - RETVAL=$? - echo + if test "$START_PLPNFSD" = "yes" ; then + echo -n "Starting Psion support (plpnfsd): " + daemon @prefix@/sbin/plpnfsd $PLPNFSD_ARGS + RETVAL=$? + echo + fi + if test "$START_PLPPRINTD" = "yes" ; then + echo -n "Starting Psion support (plpprintd): " + daemon @prefix@/sbin/plpprintd $PLPPRINTD_ARGS + RETVAL=$? + echo + fi fi [ $RETVAL -eq 0 ] && touch /var/lock/subsys/psion return $RETVAL @@ -39,11 +49,19 @@ start() { stop() { echo -n "Stopping Psion support: " - killproc plpnfsd -HUP - while true ; do - test -z "`pidofproc plpnfsd`" && break; - sleep 1 # allow plpnfsd flushing it's cache - done + if test "$START_PLPNFSD" = "yes" ; then + killproc plpnfsd -HUP + WAIT=5 + while test $WAIT -gt 0 ; do + test -z "`pidofproc plpnfsd`" && break; + sleep 1 # allow plpnfsd flushing it's cache + WAIT=`expr $WAIT - 1` + done + test -n "`pidofproc plpnfsd`" && killproc plpnfsd + fi + if test "$START_PLPPRINTD" = "yes" ; then + killproc plpprintd + fi killproc ncpd RETVAL=$? echo diff --git a/kde2/doc/de/Makefile.am b/kde2/doc/de/Makefile.am index 96e877a..c426ca4 100644 --- a/kde2/doc/de/Makefile.am +++ b/kde2/doc/de/Makefile.am @@ -4,5 +4,5 @@ KDE_DOCS = kpsion EXTRA_DIST = index.docbook.in -index.docbook: index.docbook.in +index.docbook: cat index.docbook.in | perl -e 'while (<>) { if (/\$$Date:\s+(.*)\s+\$$/) { $$d=$$1; } s/__DATE__/$$d/; s/__VERSION__/$(VERSION)/; print; }' > index.docbook diff --git a/kde2/kioslave/Makefile.am b/kde2/kioslave/Makefile.am index 1005c90..f0efa3a 100644 --- a/kde2/kioslave/Makefile.am +++ b/kde2/kioslave/Makefile.am @@ -13,7 +13,7 @@ kio_plp_la_LDFLAGS = -module -avoid-version lib_LTLIBRARIES = kio_plp.la kio_plp_la_SOURCES = kio_plp.cpp -kio_plp_la_LIBADD = -L$(top_srcdir)/lib -lplp $(LIB_KIO) +kio_plp_la_LIBADD = -L$(top_srcdir)/lib/.libs $(top_srcdir)/lib/libplp.la $(LIB_KIO) noinst_HEADERS = kio_plp.h diff --git a/kde2/klipsi/Makefile.am b/kde2/klipsi/Makefile.am index 0a26739..1b5ac7b 100644 --- a/kde2/klipsi/Makefile.am +++ b/kde2/klipsi/Makefile.am @@ -18,7 +18,7 @@ lib_LTLIBRARIES = klipsi.la CLEANFILES = dummy.cpp -klipsi_la_LIBADD = -L$(top_srcdir)/lib -lplp $(LIB_KDEUI) +klipsi_la_LIBADD = -L$(top_srcdir)/lib/.libs $(top_srcdir)/lib/libplp.la $(LIB_KDEUI) klipsi_la_SOURCES = main.cpp toplevel.cpp klipsi_la_LDFLAGS = $(all_libraries) -module -avoid-version diff --git a/kde2/klipsi/klipsi.desktop b/kde2/klipsi/klipsi.desktop index dd942c7..38a1153 100644 --- a/kde2/klipsi/klipsi.desktop +++ b/kde2/klipsi/klipsi.desktop @@ -6,4 +6,3 @@ Icon=klipsi Type=Application DocPath=klipsi/index.html Terminal=0 -X-KDE-autostart-after=panel diff --git a/kde2/kpsion/Makefile.am b/kde2/kpsion/Makefile.am index d1a7997..693334c 100644 --- a/kde2/kpsion/Makefile.am +++ b/kde2/kpsion/Makefile.am @@ -23,7 +23,7 @@ libkpsion_la_SOURCES = kpsion.cpp setupdialog.cpp wizards.cpp \ statusbarprogress.cpp kpsionconfig.cpp kpsionbackuplistview.cpp \ kpsionrestoredialog.cpp -libkpsion_la_LIBADD = $(top_srcdir)/lib/libplp.la $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) $(LIB_QT) +libkpsion_la_LIBADD = -L$(top_srcdir)/lib/.libs $(top_srcdir)/lib/libplp.la $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) $(LIB_QT) kpsion_SOURCES = main.cpp kpsion_LDFLAGS = $(KDE_RPATH) diff --git a/kde2/plugins/Makefile.am b/kde2/plugins/Makefile.am index e53176c..f8e20f7 100644 --- a/kde2/plugins/Makefile.am +++ b/kde2/plugins/Makefile.am @@ -12,7 +12,7 @@ lib_LTLIBRARIES = libplpprops.la libplpprops_la_SOURCES = plpprops.cc plppropsFactory.cc pie3dpiece.cpp \ pie3dwidget.cpp -libplpprops_la_LIBADD = -L$(top_srcdir)/lib -lplp $(LIB_KIO) $(LIB_KFILE) +libplpprops_la_LIBADD = -L$(top_srcdir)/lib/.libs $(top_srcdir)/lib/libplp.la $(LIB_KIO) $(LIB_KFILE) noinst_HEADERS = plpprops.h plppropsFactory.h pie3dpiece.h pie3dwidget.h services_DATA = plpprops.desktop diff --git a/plpprint/Makefile.am b/plpprint/Makefile.am index af5ad1b..3cde22f 100644 --- a/plpprint/Makefile.am +++ b/plpprint/Makefile.am @@ -6,6 +6,8 @@ sbin_PROGRAMS = plpprintd plpprintd_LDADD = $(top_srcdir)/lib/libplp.la plpprintd_SOURCES = plpprintd.cc +EXTRA_DIST = prolog.ps.in fontmap + pkgdata_DATA = prolog.ps fontmap maintainer-clean-local: diff --git a/plpprint/plpprintd.cc b/plpprint/plpprintd.cc index caef82d..63ce6a3 100644 --- a/plpprint/plpprintd.cc +++ b/plpprint/plpprintd.cc @@ -174,7 +174,7 @@ init_fontmap() { *p = '\0'; if ((p = strchr(buf, '\n'))) *p = '\0'; - + psifont = strsep(&bp, ":"); if (!psifont || !(*psifont)) continue; diff --git a/po/de.po b/po/de.po index 4a8fc74..cff3691 100644 --- a/po/de.po +++ b/po/de.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: plptools 0.11\n" -"POT-Creation-Date: 2002-07-08 00:00+0200\n" +"POT-Creation-Date: 2002-07-10 19:55+0200\n" "PO-Revision-Date: 2002-07-08 00:06CET\n" "Last-Translator: Fritz Elfert \n" "Language-Team: Deutsch \n" @@ -1644,7 +1644,17 @@ msgstr "Die Sicherung kann nur jeweils ein Archiv zu einer Zeit anlegen." msgid "plpbackup: could not connect to ncpd" msgstr "plpbackup: Konnte ncpd nicht kontaktieren" -#: sisinstall/sismain.cpp:43 +#: sisinstall/sismain.cpp:31 +#, fuzzy +msgid "Got an error, Press any key to exit." +msgstr "Installation beendet. Beenden mit beliebiger Taste." + +#: sisinstall/sismain.cpp:36 +#, c-format +msgid "Error %d on line %d: %s\n" +msgstr "" + +#: sisinstall/sismain.cpp:55 msgid "" "Usage: sisinstall [OPTIONS]... SISFILE\n" "\n" @@ -1666,33 +1676,37 @@ msgstr "" " -n, --dry-run Nur parsen; keine Installation.\n" " -w, --newt Benutze NEWT Oberfläche.\n" -#: sisinstall/sismain.cpp:98 +#: sisinstall/sismain.cpp:109 msgid "sisinstall version 0.1\n" msgstr "Installationsprogramm, Version 0.1\n" -#: sisinstall/sismain.cpp:117 sisinstall/sismain.cpp:125 +#: sisinstall/sismain.cpp:128 sisinstall/sismain.cpp:136 #, c-format msgid "Installing sis file %s%s.\n" msgstr "Installiere SIS-Datei %s%s.\n" -#: sisinstall/sismain.cpp:119 sisinstall/sismain.cpp:126 +#: sisinstall/sismain.cpp:130 sisinstall/sismain.cpp:137 msgid ", not really" msgstr ", nicht wirklich" -#: sisinstall/sismain.cpp:133 +#: sisinstall/sismain.cpp:145 +msgid "Missing SIS filename\n" +msgstr "" + +#: sisinstall/sismain.cpp:153 #, c-format msgid "File is %d bytes long\n" msgstr "Datei ist %d bytes lang\n" -#: sisinstall/sismain.cpp:148 +#: sisinstall/sismain.cpp:168 msgid "Couldn't connect with the Psion\n" msgstr "Konnte nicht mit dem Psion verbinden\n" -#: sisinstall/sismain.cpp:169 +#: sisinstall/sismain.cpp:189 msgid "Could not parse the sis file.\n" msgstr "Konnte SIS-Datei nicht parsen.\n" -#: sisinstall/sismain.cpp:178 +#: sisinstall/sismain.cpp:198 msgid "Installation complete. Press any key to exit." msgstr "Installation beendet. Beenden mit beliebiger Taste." @@ -1816,6 +1830,6 @@ msgstr "Versuchen Sie `plpnfsd --help' für weitere Informationen." msgid "plpnfsd Version " msgstr "ncpd Version " -#: plpprint/plpprintd.cc:795 +#: plpprint/plpprintd.cc:1011 msgid "plpprintd: could not connect to ncpd" msgstr "plpprintd: Konnte ncpd nicht kontaktieren." diff --git a/po/sv.po b/po/sv.po index ae074ac..2bb75a8 100644 --- a/po/sv.po +++ b/po/sv.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: plptools 0.11\n" -"POT-Creation-Date: 2002-07-08 00:00+0200\n" +"POT-Creation-Date: 2002-07-10 19:55+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Daniel Brahneborg \n" "Language-Team: LANGUAGE \n" @@ -1663,7 +1663,16 @@ msgstr "Backup kan bara skapa ett arkiv i taget." msgid "plpbackup: could not connect to ncpd" msgstr "plpbackup: fick ingen kontakt med ncpd" -#: sisinstall/sismain.cpp:43 +#: sisinstall/sismain.cpp:31 +msgid "Got an error, Press any key to exit." +msgstr "" + +#: sisinstall/sismain.cpp:36 +#, c-format +msgid "Error %d on line %d: %s\n" +msgstr "" + +#: sisinstall/sismain.cpp:55 msgid "" "Usage: sisinstall [OPTIONS]... SISFILE\n" "\n" @@ -1676,33 +1685,37 @@ msgid "" " -w, --newt Use the Newt interface.\n" msgstr "" -#: sisinstall/sismain.cpp:98 +#: sisinstall/sismain.cpp:109 msgid "sisinstall version 0.1\n" msgstr "" -#: sisinstall/sismain.cpp:117 sisinstall/sismain.cpp:125 +#: sisinstall/sismain.cpp:128 sisinstall/sismain.cpp:136 #, c-format msgid "Installing sis file %s%s.\n" msgstr "Installerar sisfil %s%s.\n" -#: sisinstall/sismain.cpp:119 sisinstall/sismain.cpp:126 +#: sisinstall/sismain.cpp:130 sisinstall/sismain.cpp:137 msgid ", not really" msgstr ", inte egentligen" -#: sisinstall/sismain.cpp:133 +#: sisinstall/sismain.cpp:145 +msgid "Missing SIS filename\n" +msgstr "" + +#: sisinstall/sismain.cpp:153 #, c-format msgid "File is %d bytes long\n" msgstr "Filen är %d bytes lång\n" -#: sisinstall/sismain.cpp:148 +#: sisinstall/sismain.cpp:168 msgid "Couldn't connect with the Psion\n" msgstr "Kunde inte få kontakt med Psionen\n" -#: sisinstall/sismain.cpp:169 +#: sisinstall/sismain.cpp:189 msgid "Could not parse the sis file.\n" msgstr "Kunde inte parsa sisfilen.\n" -#: sisinstall/sismain.cpp:178 +#: sisinstall/sismain.cpp:198 msgid "Installation complete. Press any key to exit." msgstr "" @@ -1805,7 +1818,7 @@ msgstr "Prova 'plpftp --help' f msgid "plpnfsd Version " msgstr "" -#: plpprint/plpprintd.cc:795 +#: plpprint/plpprintd.cc:1011 #, fuzzy msgid "plpprintd: could not connect to ncpd" msgstr "plpftp: kunde inte få kontakt med ncpd" diff --git a/sisinstall/sismain.cpp b/sisinstall/sismain.cpp index 404cb20..b673c13 100644 --- a/sisinstall/sismain.cpp +++ b/sisinstall/sismain.cpp @@ -20,9 +20,21 @@ #define _GNU_SOURCE #include +bool usenewt = false; + static void error(int line) { - fprintf(stderr, "Got errno = %d on line %d\n", errno, line); +#if HAVE_LIBNEWT + if (usenewt) + { + newtPopHelpLine(); + newtPushHelpLine(_("Got an error, Press any key to exit.")); + newtWaitForKey(); + newtFinished(); + } +#endif + fprintf(stderr, _("Error %d on line %d: %s\n"), errno, line, + strerror(errno)); exit(1); } @@ -59,7 +71,6 @@ void main(int argc, char* argv[]) char* filename = 0; char option; bool dryrun = false; - bool usenewt = false; #ifdef LC_ALL setlocale(LC_ALL, ""); @@ -107,7 +118,7 @@ void main(int argc, char* argv[]) } #endif if (optind < argc) - { + { filename = argv[optind]; #if HAVE_LIBNEWT if (usenewt) @@ -124,7 +135,16 @@ void main(int argc, char* argv[]) #endif printf(_("Installing sis file %s%s.\n"), filename, dryrun ? _(", not really") : ""); - } + } + else + { +#if HAVE_LIBNEWT + if (usenewt) + newtFinished(); +#endif + fprintf(stderr, _("Missing SIS filename\n")); + exit(1); + } struct stat st; if (-1 == stat(filename, &st)) error(__LINE__); -- cgit v1.2.3