]> git.pld-linux.org Git - packages/openssh.git/commitdiff
- reverting last change: removing new macros from %p{re,ost}{,un}
authorsaq <saq@pld-linux.org>
Thu, 26 Jul 2001 05:42:22 +0000 (05:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    openssh.spec -> 1.89

openssh.spec

index 8b0045760bc96a2ed878d23f7746077625e86c5a..1324f5b16b192c2825f780de3a50566cdf6eaa4a 100644 (file)
@@ -216,6 +216,7 @@ touch $RPM_BUILD_ROOT/etc/security/blacklist.sshd
 rm -rf $RPM_BUILD_ROOT
 
 %post server
+/sbin/chkconfig --add sshd
 if [ ! -f %{_sysconfdir}/ssh_host_key -o ! -s %{_sysconfdir}/ssh_host_key ]; then
        %{_bindir}/ssh-keygen -t rsa1 -f %{_sysconfdir}/ssh_host_key -N '' 1>&2
        chmod 600 %{_sysconfdir}/ssh_host_key
@@ -229,13 +230,22 @@ if [ ! -f %{_sysconfdir}/ssh_host_dsa_key -o ! -s %{_sysconfdir}/ssh_host_dsa_ke
         %{_bindir}/ssh-keygen -t dsa -f %{_sysconfdir}/ssh_host_dsa_key -N '' 1>&2
        chmod 600 %{_sysconfdir}/ssh_host_dsa_key
 fi
+if [ -f /var/lock/subsys/sshd ]; then
+       /etc/rc.d/init.d/sshd restart 1>&2
+else
+       echo "Run \"/etc/rc.d/init.d/sshd start\" to start openssh daemon."
+fi
 if ! grep ssh /etc/security/passwd.conf >/dev/null 2>&1 ; then
        echo "ssh" >> /etc/security/passwd.conf
 fi
-NAME=sshd; DESC="openssh daemon"; %chkconfig_add
 
 %preun server
-NAME=sshd; %chkconfig_del
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/sshd ]; then
+               /etc/rc.d/init.d/sshd stop 1>&2
+       fi
+       /sbin/chkconfig --del sshd
+fi
 
 %files
 %defattr(644,root,root,755)
This page took 0.303092 seconds and 4 git commands to generate.