Hello community, here is the log from the commit of package nginx-0.8 for openSUSE:Factory checked in at Tue Jan 18 00:32:03 CET 2011. -------- New Changes file: --- /dev/null 2010-08-26 16:28:41.000000000 +0200 +++ nginx-0.8/nginx-0.8.changes 2010-12-21 15:27:10.000000000 +0100 @@ -0,0 +1,150 @@ +------------------------------------------------------------------- +Tue Dec 21 14:19:08 UTC 2010 - lslezak@suse.cz + +- fixed packaging on openSUSE-11.4 - some perl-files are not + generated + +------------------------------------------------------------------- +Thu Nov 4 00:37:46 UTC 2010 - alexandre@exatati.com.br + +- Update to 0.8.53: + * Feature: now the "error_page" directive allows to change a status + code in a redirect. + * Feature: the "gzip_disable" directive supports special "degradation" + mask. + * Bugfix: a socket leak might occurred if file AIO was used. + Thanks to Maxim Dounin. + * Bugfix: if the first server had no "listen" directive and there was + no explicit default server, then a next server with a "listen" + directive became the default server; the bug had appeared in 0.8.21. + +------------------------------------------------------------------- +Sat Oct 16 21:58:13 UTC 2010 - cristian.rodriguez@opensuse.org + +- Update to version 0.8.52 + * Bugfix: nginx used SSL mode for a listen socket if any listen option + was set; the bug had appeared in 0.8.51. + * Change: the "secure_link_expires" directive has been canceled. + * Change: a logging level of resolver errors has been lowered from + "alert" to "error". + * Feature: now a listen socket "ssl" parameter may be set several + times. + +------------------------------------------------------------------- +Wed Sep 8 14:24:52 UTC 2010 - alexandre@exatati.com.br + +- Update to 0.8.50; +- Bzip2 source file; +- Spec file cleaned with spec-cleaner. + +------------------------------------------------------------------- +Wed Jun 23 10:17:00 UTC 2010 - jg@internetx.de + +- update to 0.8.42 + +------------------------------------------------------------------- +Thu Apr 29 14:48:36 UTC 2010 - mrueckert@suse.de + +- update to 0.8.36 + +------------------------------------------------------------------- +Mon Feb 08 13:38:00 CEST 2010 - jg@internetx.de + +- 0.8.33 + +------------------------------------------------------------------ +Tue Dec 15 15:07:00 CEST 2009 - jg@internetx.de + +- bumped to 0.8.29 + +------------------------------------------------------------------ +Wed Nov 18 09:14:00 CEST 2009 - jg@internetx.de + +update to 0.8.27 + +------------------------------------------------------------------ +Tue Nov 17 10:34:00 CEST 2009 - jg@internetx.de + +- 0.8.26 +- enabled file-aio for sle11 & opensuse 10.3 -> Factory + +------------------------------------------------------------------ + +Wed Nov 11 12:36:00 CEST 2009 - jg@internetx.de + +- 0.8.23 + +------------------------------------------------------------------ +Wed Nov 04 14:21:00 CEST 2009 - jg@internetx.de + +- 0.8.22 + +------------------------------------------------------------------ +Wed Oct 28 08:52:00 CEST 2009 - jg@internetx.de + +- 0.8.21 + +------------------------------------------------------------------ +Wed Oct 14 15:28:00 CEST 2009 - jg@internetx.de + +- 0.8.20 + +------------------------------------------------------------------ +Mon Sep 28 16:14:00 CEST 2009 - jg@internetx.de + +- 0.8.17 + + +------------------------------------------------------------------ + +Fri Sep 25 16:13:00 CEST 2009 - jg@internetx.de + +- 0.8.16 + +------------------------------------------------------------------ + +Mon Sep 14 15:48:00 CEST 2009 - jg@internetx.de + +- 0.8.15 + +------------------------------------------------------------------ + +Wed Sep 9 13:46:00 CEST 2009 - jg@internetx.de + +- 0.8.14 + +------------------------------------------------------------------ + +Mon Aug 31 09:30:00 CEST 2009 - jg@internetx.de + +- 0.8.11 + +------------------------------------------------------------------ + +Thu Aug 20 09:28:00 CEST 2009 - jg@internetx.de + +- 0.8.9 + +------------------------------------------------------------------ + +Mon Aug 10 11:43:00 CEST 2009 - jg@internetx.de + +- 0.8.8 + +------------------------------------------------------------------ +Mon Jul 20 10:56:00 CEST 2009 - jg@internetx.de + +- upgrade to version 0.8.6 + +------------------------------------------------------------------- + +Mon Jul 13 14:19:00 CEST 2009 - jg@internetx.de + +- upgrade to version 0.8.5 + +------------------------------------------------------------------- +Tue Jun 23 10:57:00 CEST 2009 - jg@internetx.de + +- start packaging the 0.8 branch + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- nginx-0.4.0-no_Werror.patch nginx-0.4.0-perl_vendor_install.patch nginx-0.6.31-DESTDIR.patch nginx-0.6.31_default_config.patch nginx-0.6.38-html.patch nginx-0.8.53.tar.bz2 nginx-0.8.changes nginx-0.8.spec nginx.init ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nginx-0.8.spec ++++++ # # spec file for package nginx-0.8 # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: nginx-0.8 Version: 0.8.53 Release: 1 # %define pkg_name nginx # %define ngx_prefix %{_prefix} %define ngx_sbindir %{_sbindir}/nginx %define ngx_conf_dir %{_sysconfdir}/nginx %define ngx_conf_path %{ngx_conf_dir}/nginx.conf %define ngx_error_log /var/log/nginx/error.log %define ngx_access_log /var/log/nginx/access.log %define ngx_pid_path /var/run/nginx.pid %define ngx_lock_path /var/run/nginx.lock %define ngx_home /var/lib/nginx %define ngx_tmp_http %{ngx_home}/tmp/ %define ngx_tmp_proxy %{ngx_home}/proxy/ %define ngx_tmp_fcgi %{ngx_home}/fastcgi/ %define ngx_user_group nginx %define rubygem_passenger_version 3.0.2 # License: BSD # Summary: A HTTP server and IMAP/POP3 proxy server # Url: http://nginx.net/ Group: Productivity/Networking/Web/Proxy Source: http://sysoev.ru/nginx/nginx-%{version}.tar.bz2 Source1: nginx.init # PATCH-FIX-UPSTREAM nginx-0.4.0-no_Werror.patch Patch: nginx-0.4.0-no_Werror.patch # PATCH-FIX-UPSTREAM nginx-0.6.31-DESTDIR.patch # Patch1: nginx-0.6.31-DESTDIR.patch # Patch2: nginx-0.4.0-html.patch # PATCH-FIX-UPSTREAM nginx-0.6.38-html.patch Patch2: nginx-0.6.38-html.patch # PATCH-FIX-UPSTREAM nginx-0.4.0-perl_vendor_install.patch Patch3: nginx-0.4.0-perl_vendor_install.patch # PATCH-FIX-UPSTREAM nginx-0.6.31_default_config.patch Patch4: nginx-0.6.31_default_config.patch BuildRequires: dos2unix BuildRequires: gd-devel BuildRequires: libxslt-devel BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig BuildRequires: zlib-devel BuildRequires: rubygem-passenger-nginx = %rubygem_passenger_version BuildRequires: gcc-c++ BuildRequires: libcurl-devel Requires: rubygem-passenger-nginx, pcre PreReq: %fillup_prereq PreReq: %insserv_prereq PreReq: pwdutils Provides: nginx = %{version} Provides: nginx-passenger = %{version} # BuildRoot: %{_tmppath}/%{name}-%{version}-build Conflicts: nginx-0.5 nginx-0.6 nginx-0.7 %requires_eq perl %description nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. It has been running on many heavily loaded Russian sites for more than two years. Author: ------- Igor Sysoev %prep %setup -n %{pkg_name}-%{version} %patch #%patch1 %patch2 %patch3 %patch4 dos2unix contrib/geo2nginx.pl %build #copy source from rubygem-passenger in order to #generate *.o files which will be needed for nxing comilation cp -R %{_libdir}/ruby/gems/%{rb_ver}/gems/passenger-%{rubygem_passenger_version} . pushd passenger-%{rubygem_passenger_version}/ rm ext/libev/*.lo export PATH="%{_sbindir}:$PATH" #compiling nginx stuff for passenger rake nginx:clean nginx CACHING=no popd ./configure \ --prefix=%{ngx_prefix}/ \ --sbin-path=%{ngx_sbindir} \ --conf-path=%{ngx_conf_path} \ --error-log-path=%{ngx_error_log} \ --http-log-path=%{ngx_access_log} \ --pid-path=%{ngx_pid_path} \ --lock-path=%{ngx_lock_path} \ --http-client-body-temp-path=%{ngx_tmp_http} \ --http-proxy-temp-path=%{ngx_tmp_proxy} \ --http-fastcgi-temp-path=%{ngx_tmp_fcgi} \ --user=nginx --group=nginx \ --with-rtsig_module \ --with-select_module \ --with-poll_module \ --with-ipv6 \ %if 0%{?sles_version} == 11 || 0%{?suse_version} == 1030 || 0%{?suse_version} == 1100 || 0%{?suse_version} == 1110 || 0%{?suse_version} > 1110 --with-file-aio \ %endif --with-http_ssl_module \ --with-http_realip_module \ --with-http_addition_module \ --with-http_xslt_module \ --with-http_image_filter_module \ --with-http_sub_module \ --with-http_dav_module \ --with-http_flv_module \ --with-http_gzip_static_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_stub_status_module \ --with-http_perl_module \ --with-perl=%{_bindir}/perl \ --with-mail \ --with-md5=/usr \ --with-sha1=/usr \ --with-pcre \ --add-module=passenger-%{rubygem_passenger_version}/ext/nginx \ %if 0%{?suse_version} > 1000 || 0%{?fedora_version} > 4 || 0%{?mandriva_version} > 2006 --with-cc-opt="%{optflags} -fstack-protector" %else --with-cc-opt="%{optflags}" %endif %{__make} %install %makeinstall %perl_process_packlist # %{__install} -d -m 0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi} # %{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name} %{__ln_s} -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} rm -rf passenger-%{rubygem_passenger_version}/ %post %fillup_and_insserv %{pkg_name} %preun %stop_on_removal %{pkg_name} %postun %restart_on_update %{pkg_name} %{insserv_cleanup} %clean %{__rm} -rf %{buildroot} %pre /usr/sbin/groupadd -r %{ngx_user_group} &>/dev/null ||: /usr/sbin/useradd -g %{ngx_user_group} -s /bin/false -r -c "user for %{ngx_user_group}" -d %{ngx_home} %{ngx_user_group} &>/dev/null ||: %files %defattr(-,root,root,-) %dir %{ngx_conf_dir}/ %config(noreplace) %{ngx_conf_dir}/koi-utf %config(noreplace) %{ngx_conf_dir}/koi-win %config(noreplace) %{ngx_conf_dir}/fastcgi_params %config(noreplace) %{ngx_conf_dir}/fastcgi_params.default %config(noreplace) %{ngx_conf_dir}/mime.types %config(noreplace) %{ngx_conf_dir}/mime.types.default %config(noreplace) %{ngx_conf_dir}/nginx.conf %config(noreplace) %{ngx_conf_dir}/nginx.conf.default %config(noreplace) %{ngx_conf_dir}/fastcgi.conf %config(noreplace) %{ngx_conf_dir}/fastcgi.conf.default %config(noreplace) %{ngx_conf_dir}/win-utf %config(noreplace) %{ngx_conf_dir}/scgi_params %config(noreplace) %{ngx_conf_dir}/scgi_params.default %config(noreplace) %{ngx_conf_dir}/uwsgi_params %config(noreplace) %{ngx_conf_dir}/uwsgi_params.default %dir %{perl_vendorarch}/auto/nginx/ %if 0%{?suse_version} == 0 || 0%{?suse_version} <= 1130 %{perl_vendorarch}/auto/nginx/.packlist %endif %{perl_vendorarch}/auto/nginx/nginx.bs %{perl_vendorarch}/auto/nginx/nginx.so %{perl_vendorarch}/nginx.pm %{ngx_sbindir} %{_mandir}/man3/nginx.3pm* /srv/www/htdocs/50x.html /srv/www/htdocs/index.html %if 0%{?suse_version} == 0 || 0%{?suse_version} <= 1130 %{_localstatedir}/adm/perl-modules/%{name} %endif %{_sysconfdir}/init.d/%{pkg_name} %{_sbindir}/rc%{pkg_name} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) /var/log/nginx/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/tmp/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/proxy/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/fastcgi/ %doc CHANGES* LICENSE README %doc conf/ contrib/ %changelog ++++++ nginx-0.4.0-no_Werror.patch ++++++ Index: auto/cc/gcc =================================================================== --- auto/cc/gcc.orig +++ auto/cc/gcc @@ -171,7 +171,7 @@ # stop on warning -CFLAGS="$CFLAGS -Werror" +CFLAGS="$CFLAGS" # debug CFLAGS="$CFLAGS -g" ++++++ nginx-0.4.0-perl_vendor_install.patch ++++++ Index: auto/install =================================================================== --- auto/install.orig +++ auto/install @@ -7,7 +7,7 @@ cat << END >> $NGX_MAKEFILE install_perl_modules: - cd $NGX_OBJS/src/http/modules/perl && make install + cd $NGX_OBJS/src/http/modules/perl && make install_vendor END NGX_INSTALL_PERL_MODULES=install_perl_modules ++++++ nginx-0.6.31-DESTDIR.patch ++++++ Index: auto/install =================================================================== --- auto/install.orig 2007-07-30 12:51:55.000000000 +0200 +++ auto/install 2008-05-29 18:00:45.383221398 +0200 @@ -19,45 +19,45 @@ cat << END install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \ $NGX_INSTALL_PERL_MODULES - test -d '$NGX_PREFIX' || mkdir -p '$NGX_PREFIX' + test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX' - test -d '`dirname "$NGX_SBIN_PATH"`' \ - || mkdir -p '`dirname "$NGX_SBIN_PATH"`' - test ! -f '$NGX_SBIN_PATH' || mv '$NGX_SBIN_PATH' '$NGX_SBIN_PATH.old' - cp $NGX_OBJS/nginx '$NGX_SBIN_PATH' + test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \ + || mkdir -p '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' + test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' || mv '\$(DESTDIR)$NGX_SBIN_PATH' '\$(DESTDIR)$NGX_SBIN_PATH.old' + cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH' - test -d '$NGX_CONF_PREFIX' || mkdir -p '$NGX_CONF_PREFIX' + test -d '\$(DESTDIR)$NGX_CONF_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX' - cp conf/koi-win '$NGX_CONF_PREFIX' - cp conf/koi-utf '$NGX_CONF_PREFIX' - cp conf/win-utf '$NGX_CONF_PREFIX' + cp conf/koi-win '\$(DESTDIR)$NGX_CONF_PREFIX' + cp conf/koi-utf '\$(DESTDIR)$NGX_CONF_PREFIX' + cp conf/win-utf '\$(DESTDIR)$NGX_CONF_PREFIX' - test -f '$NGX_CONF_PREFIX/mime.types' \ - || cp conf/mime.types '$NGX_CONF_PREFIX' - cp conf/mime.types '$NGX_CONF_PREFIX/mime.types.default' + test -f '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types' \ + || cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX' + cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types.default' - test -f '$NGX_CONF_PREFIX/fastcgi_params' \ - || cp conf/fastcgi_params '$NGX_CONF_PREFIX' - cp conf/fastcgi_params '$NGX_CONF_PREFIX/fastcgi_params.default' + test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params' \ + || cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' + cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params.default' - test -f '$NGX_CONF_PATH' || cp conf/nginx.conf '$NGX_CONF_PREFIX' - cp conf/nginx.conf '$NGX_CONF_PREFIX/nginx.conf.default' + test -f '\$(DESTDIR)$NGX_CONF_PATH' || cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX' + cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default' - test -d '`dirname "$NGX_PID_PATH"`' \ - || mkdir -p '`dirname "$NGX_PID_PATH"`' + test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \ + || mkdir -p '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' - test -d '`dirname "$NGX_HTTP_LOG_PATH"`' || \ - mkdir -p '`dirname "$NGX_HTTP_LOG_PATH"`' + test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' || \ + mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' - test -d '$NGX_PREFIX/html' || cp -r html '$NGX_PREFIX' + test -d '\$(DESTDIR)$NGX_PREFIX/html' || cp -r html '\$(DESTDIR)$NGX_PREFIX' END -if test -n "$NGX_ERROR_LOG_PATH"; then +if test -n "\$(DESTDIR)$NGX_ERROR_LOG_PATH"; then cat << END >> $NGX_MAKEFILE - test -d '`dirname "$NGX_ERROR_LOG_PATH"`' || \ - mkdir -p '`dirname "$NGX_ERROR_LOG_PATH"`' + test -d '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' || \ + mkdir -p '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' END fi ++++++ nginx-0.6.31_default_config.patch ++++++ Index: conf/nginx.conf =================================================================== --- conf/nginx.conf.orig 2009-04-06 15:43:46.000000000 +0200 +++ conf/nginx.conf 2009-05-08 20:19:55.436773498 +0200 @@ -1,12 +1,12 @@ -#user nobody; +user nginx; worker_processes 1; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; +#error_log /var/log/nginx/error.log; +#error_log /var/log/nginx/error.log notice; +#error_log /var/log/nginx/error.log info; -#pid logs/nginx.pid; +#pid /var/run/nginx.pid; events { @@ -22,7 +22,7 @@ http { # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; - #access_log logs/access.log main; + #access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; @@ -38,10 +38,10 @@ http { #charset koi8-r; - #access_log logs/host.access.log main; + #access_log /var/log/nginx/host.access.log main; location / { - root html; + root /srv/www/htdocs/; index index.html index.htm; } @@ -51,7 +51,7 @@ http { # error_page 500 502 503 504 /50x.html; location = /50x.html { - root html; + root /srv/www/htdocs/; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 @@ -87,7 +87,7 @@ http { # server_name somename alias another.alias; # location / { - # root html; + # root /srv/www/htdocs/; # index index.html index.htm; # } #} @@ -110,7 +110,7 @@ http { # ssl_prefer_server_ciphers on; # location / { - # root html; + # root /srv/www/htdocs/; # index index.html index.htm; # } #} ++++++ nginx-0.6.38-html.patch ++++++ Index: auto/install =================================================================== --- auto/install.orig +++ auto/install @@ -54,8 +54,7 @@ test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' || \ mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' - test -d '\$(DESTDIR)$NGX_PREFIX/html' \ - || cp -r html '\$(DESTDIR)$NGX_PREFIX' + test -d '\$(DESTDIR)/srv/www/htdocs' || install -d '\$(DESTDIR)/srv/www/' && cp -r html '\$(DESTDIR)/srv/www/htdocs' END ++++++ nginx.init ++++++ #!/bin/sh # # Copyright (C) 1995--2007 Marcus Rückert, SUSE / Novell Inc. # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or (at # your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, # USA. # # /etc/init.d/nginx # and its symbolic link # /(usr/)sbin/rcnginx # # Template system startup script for some example service/daemon nginx # # LSB compatible service control script; see http://www.linuxbase.org/spec/ # # Note: This template uses functions rc_XXX defined in /etc/rc.status on # UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your # script on this template and ensure that it works on non UL based LSB # compliant Linux distributions, you either have to provide the rc.status # functions from UL or change the script to work without them. # See skeleton.compat for a template that works with other distros as well. # ### BEGIN INIT INFO # Provides: nginx # Required-Start: $syslog $remote_fs # Should-Start: $time ypbind sendmail # Required-Stop: $syslog $remote_fs # Should-Stop: $time ypbind sendmail # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: nginx # Description: nginx ### END INIT INFO # # Any extensions to the keywords given above should be preceeded by # X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB. # # Notes on Required-Start/Should-Start: # * There are two different issues that are solved by Required-Start # and Should-Start # (a) Hard dependencies: This is used by the runlevel editor to determine # which services absolutely need to be started to make the start of # this service make sense. Example: nfsserver should have # Required-Start: $portmap # Also, required services are started before the dependent ones. # The runlevel editor will warn about such missing hard dependencies # and suggest enabling. During system startup, you may expect an error, # if the dependency is not fulfilled. # (b) Specifying the init script ordering, not real (hard) dependencies. # This is needed by insserv to determine which service should be # started first (and at a later stage what services can be started # in parallel). The tag Should-Start: is used for this. # It tells, that if a service is available, it should be started # before. If not, never mind. # * When specifying hard dependencies or ordering requirements, you can # use names of services (contents of their Provides: section) # or pseudo names starting with a $. The following ones are available # according to LSB (1.1): # $local_fs all local file systems are mounted # (most services should need this!) # $remote_fs all remote file systems are mounted # (note that /usr may be remote, so # many services should Require this!) # $syslog system logging facility up # $network low level networking (eth card, ...) # $named hostname resolution available # $netdaemons all network daemons are running # The $netdaemons pseudo service has been removed in LSB 1.2. # For now, we still offer it for backward compatibility. # These are new (LSB 1.2): # $time the system time has been set correctly # $portmap SunRPC portmapping service available # UnitedLinux extensions: # $ALL indicates that a script should be inserted # at the end # * The services specified in the stop tags # (Required-Stop/Should-Stop) # specify which services need to be still running when this service # is shut down. Often the entries there are just copies or a subset # from the respective start tag. # * Should-Start/Stop are now part of LSB as of 2.0, # formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop. # insserv does support both variants. # * X-UnitedLinux-Default-Enabled: yes/no is used at installation time # (%fillup_and_insserv macro in %post of many RPMs) to specify whether # a startup script should default to be enabled after installation. # It's not used by insserv. # # Note on runlevels: # 0 - halt/poweroff 6 - reboot # 1 - single user 2 - multiuser without network exported # 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm) # # Note on script names: # http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html # A registry has been set up to manage the init script namespace. # http://www.lanana.org/ # Please use the names already registered or register one or use a # vendor prefix. # Check for missing binaries (stale symlinks should not happen) # Note: Special treatment of stop for LSB conformance NGINX_BIN=/usr/sbin/nginx test -x $NGINX_BIN || { echo "$NGINX_BIN not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } # Check for existence of needed config file and read it #NGINX_CONFIG=/etc/sysconfig/nginx #test -r $NGINX_CONFIG || { echo "$NGINX_CONFIG not existing"; # if [ "$1" = "stop" ]; then exit 0; # else exit 6; fi; } # # Read config #. $NGINX_CONFIG # Source LSB init functions # providing start_daemon, killproc, pidofproc, # log_success_msg, log_failure_msg and log_warning_msg. # This is currently not used by UnitedLinux based distributions and # not needed for init scripts for UnitedLinux only. If it is used, # the functions from rc.status should not be sourced or used. #. /lib/lsb/init-functions # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v be verbose in local rc status and clear it afterwards # rc_status -v -r ditto and clear both the local and overall rc status # rc_status -s display "skipped" and exit with status 3 # rc_status -u display "unused" and exit with status 3 # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num> # rc_reset clear both the local and overall rc status # rc_exit exit appropriate to overall rc status # rc_active checks whether a service is activated by symlinks . /etc/rc.status # Reset status of this service rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - user had insufficient privileges # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signaling is not supported) are # considered a success. case "$1" in start) echo -n "Starting nginx " ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. /sbin/startproc $NGINX_BIN # Remember status and be verbose rc_status -v ;; stop) echo -n "Shutting down nginx " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. /sbin/killproc -TERM $NGINX_BIN # Remember status and be verbose rc_status -v ;; try-restart|condrestart) ## Do a restart only if the service was active before. ## Note: try-restart is now part of LSB (as of 1.9). ## RH has a similar command named condrestart. if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi # Remember status and be quiet rc_status ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet rc_status ;; force-reload) ## Signal the daemon to reload its config. Most daemons ## do this on signal 1 (SIGHUP). ## If it does not support it, restart the service if it ## is running. echo -n "Reload service nginx " ## if it supports it: /sbin/killproc -HUP $NGINX_BIN #touch /var/run/nginx.pid rc_status -v ## Otherwise: #$0 try-restart #rc_status ;; reload) ## Like force-reload, but if daemon does not support ## signaling, do nothing (!) # If it supports signaling: echo -n "Reload service nginx " /sbin/killproc -HUP $NGINX_BIN #touch /var/run/nginx.pid rc_status -v ## Otherwise if it does not support reload: #rc_failed 3 #rc_status -v ;; status) echo -n "Checking for service nginx " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. # Return value is slightly different for the status command: # 0 - service up and running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running (unused) # 4 - service status unknown :-( # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) # NOTE: checkproc returns LSB compliant status values. /sbin/checkproc $NGINX_BIN # NOTE: rc_status knows that we called this init script with # "status" option and adapts its messages accordingly. rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, print out the ## argument to this init script which is required for a reload. ## Note: probe is not (yet) part of LSB (as of 1.9) test /etc/nginx/nginx.conf -nt /var/run/nginx.pid && echo reload ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" exit 1 ;; esac rc_exit ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org