--- qtsmbstatus-2.2.1/client/client.pro.orig 2012-02-19 17:45:44.000000000 +0000 +++ qtsmbstatus-2.2.1/client/client.pro 2012-08-06 23:08:05.000000000 +0000 @@ -68,13 +68,13 @@ FORMS += form_smbstatus.ui \ # install unix { # Translation -TRANSDIR = /usr/local/share/qtsmbstatus +TRANSDIR = /usr/share/qtsmbstatus TRANSFILES = ./tr/*.qm trans.path = $$TRANSDIR trans.files = $$TRANSFILES # Documentation -DOCDIR = /usr/local/share/doc/qtsmbstatus +DOCDIR = /usr/share/doc/qtsmbstatus DOCFILES = ../README \ ../README-FR \ ../INSTALL \ @@ -95,13 +95,13 @@ menu.path = $$MENUDIR menu.files = $$MENUFILES #manpage -MANDIR = /usr/local/share/man/man7 +MANDIR = /usr/share/man/man7 MANFILES = qtsmbstatus.7.gz manpage.path = $$MANDIR manpage.files = $$MANFILES -target.path = /usr/local/bin +target.path = /usr/bin INSTALLS += trans \ target \ --- qtsmbstatus-2.2.1/light/light.pro.orig 2012-02-19 17:45:47.000000000 +0000 +++ qtsmbstatus-2.2.1/light/light.pro 2012-08-06 23:08:05.000000000 +0000 @@ -60,13 +60,13 @@ FORMS += ../client/form_smbstatus.ui \ # install unix { # Translation - TRANSDIR = /usr/local/share/qtsmbstatus + TRANSDIR = /usr/share/qtsmbstatus TRANSFILES = ../client/tr/*.qm trans.path = $$TRANSDIR trans.files = $$TRANSFILES # Documentation - DOCDIR = /usr/local/share/doc/qtsmbstatusl + DOCDIR = /usr/share/doc/qtsmbstatusl DOCFILES = ../README \ ../README-FR \ ../INSTALL \ @@ -87,13 +87,13 @@ unix { menu.files = $$MENUFILES #manpage - MANDIR = /usr/local/share/man/man7 + MANDIR = /usr/share/man/man7 MANFILES = qtsmbstatusl.7.gz manpage.path = $$MANDIR manpage.files = $$MANFILES - target.path = /usr/local/bin + target.path = /usr/bin INSTALLS += trans \ target \ --- qtsmbstatus-2.2.1/server/etc/qtsmbstatusd.orig 2012-02-19 17:45:44.000000000 +0000 +++ qtsmbstatus-2.2.1/server/etc/qtsmbstatusd 2012-08-06 23:08:05.000000000 +0000 @@ -1,81 +1,56 @@ #!/bin/sh -# script for qtsmbstatusd -# # For LSB ### BEGIN INIT INFO # Provides: qtsmbstatusd # Required-Start: $samba # Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 # Short-Description: start qtsmbstatusd server at boot time # Description: QtSmbstatus is a graphical user interface for smbstatus ### END INIT INFO -# For Mandrake/Mandriva/Fedora: -# chkconfig: 2345 99 20 +# chkconfig: 35 99 20 # description: qtsmbstatusd server (QtSmbstatus is a graphical user interface for smbstatus) +# processname: qtsmbstatusd +# pidfile: /var/run/qtsmbstatusd.pid -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:$PATH -NAME=qtsmbstatusd - -# see if qtsmbstatusd is running -pid=`ps ax | awk '{print $1,$5}' | grep $NAME | awk '{print $1}' | awk '{print $1}'` - -# get locale -default_locale=en_US.UTF-8 -if [ -f /etc/default/locale ]; then - # Debian systems - system_locale=`grep -re "LANG=" /etc/default/locale | awk 'BEGIN { FS = "[\"]" } { print $2 }'` -elif [ -f /etc/sysconfig/language ]; then - # SuSE systems - system_locale=`grep -re "LANG=" /etc/sysconfig/language | awk 'BEGIN { FS = "[\"]" } { print $2 }'` -elif [ -f /etc/sysconfig/i18n ]; then - # RedHat/mandriva systems - system_locale=`grep -re "LANG=" /etc/sysconfig/i18n | awk 'BEGIN { FS = "[\"]" } { print $2 }'` -elif [ -f /etc/profile ]; then - #default - system_locale=`grep -re "LANG=" /etc/profile | awk 'BEGIN { FS = "[\"]" } { print $2 }'` -fi - -if [ -z $system_locale ]; then system_locale=$default_locale; fi +. /etc/rc.d/init.d/functions -# Start or stop the qtsmbstatusd server -case $1 in - start | restart | reload | force-reload) - export LANG=$system_locale - if test "$pid" != ""; then - kill $pid - if qtsmbstatusd -d; then - echo "qtsmbstatusd server restarted." - fi - else - if qtsmbstatusd -d; then - echo "qtsmbstatusd server started." - fi - fi - ;; - stop) - if test "$pid" != ""; then - kill -3 $pid - fi - echo "qtsmbstatusd server stopped" - ;; - - status) - if test "$pid" != ""; then - echo "qtsmbstatusd : server is running." - else - echo "qtsmbstatusd : server is not running." - fi - ;; +SourceIfExists /etc/sysconfig/i18n + +NAME=qtsmbstatusd +PIDFILE=/var/run/$NAME.pid +LOCKFILE=/var/lock/subsys/$NAME - *) - echo "Usage: qtsmbstatusd {start|stop|reload|restart|status|force-reload}" - exit 1 - ;; +# See how we were called. +case "$1" in + start) + # Start daemon. + export LANG + start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --user root --expect-user root -- /usr/sbin/$NAME -d \ + && echo `ps ax | awk '{print $1,$5}' | grep $NAME | awk '{print $1}' | awk '{print $1}'` > $PIDFILE || failure + ;; + stop) + # Stop daemon. + stop_daemon --lockfile "$LOCKFILE" --expect-user root -- $NAME || failure + ;; + restart) + $0 stop + $0 start + ;; + condrestart) + if [ -e "$LOCKFILE" ]; then + $0 restart + fi + ;; + status) + status --pidfile "$PIDFILE" --expect-user root -- $NAME + ;; + *) + echo "Usage: $NAME {start|stop|restart|status|condrestart}" + exit 1 esac - + exit 0 - --- qtsmbstatus-2.2.1/server/pam.d/qtsmbstatusd.orig 2012-02-19 17:45:44.000000000 +0000 +++ qtsmbstatus-2.2.1/server/pam.d/qtsmbstatusd 2012-08-06 22:57:20.000000000 +0000 @@ -3,8 +3,9 @@ # # This is a generic file. Please read documentation. -auth required pam_unix.so nullok +#%PAM-1.0 +auth include system-auth auth required pam_listfile.so file=/etc/qtsmbstatusd/qtsmbstatusd.users onerr=fail sense=allow item=user -account required pam_unix.so -session required pam_unix.so -password required pam_unix.so +account include system-auth +password include system-auth +session include system-auth --- qtsmbstatus-2.2.1/server/server.pro.orig 2012-02-19 17:45:44.000000000 +0000 +++ qtsmbstatus-2.2.1/server/server.pro 2012-08-06 23:08:05.000000000 +0000 @@ -54,13 +54,13 @@ PAMFILE = ./pam.d/qtsmbstatusd pam.path = $$PAMDIR pam.files += $$PAMFILE -INITDIR= /etc/init.d +INITDIR= /etc/rc.d/init.d INITFILE = ./etc/qtsmbstatusd init.path = $$INITDIR init.files += $$INITFILE #doc -DOCDIR = /usr/local/share/doc/qtsmbstatusd +DOCDIR = /usr/share/doc/qtsmbstatusd DOCFILES = ../README \ ../README-FR \ ../INSTALL \ @@ -69,15 +69,12 @@ doc.path = $$DOCDIR doc.files += $$DOCFILES #manpage -MANDIR = /usr/local/share/man/man7 +MANDIR = /usr/share/man/man7 MANFILES = qtsmbstatusd.7.gz manpage.path = $$MANDIR manpage.files = $$MANFILES -target.path = /usr/local/bin/ - -postinstall.path=/ -postinstall.extra+= sh $$(PWD)/postinst.sh \$(INSTALL_ROOT) +target.path = /usr/sbin/ unix { INSTALLS += data \