- rotate /var/log/vcached.log
[util-vserver.git] / util-vserver.spec
index 42c9684..719665a 100644 (file)
@@ -73,6 +73,11 @@ test "%_initrddir" = %_sysconfdir/init.d || {
        mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
 }
 
+mkdir -p ${RPM_BUILD_ROOT}/bin
+ln -f ${RPM_BUILD_ROOT}%_sbindir/vsh ${RPM_BUILD_ROOT}/bin/vsh
+
+install -D -m 644 sysv/vcached.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/vcached
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -97,8 +102,8 @@ fi
 for i in %{services} ; do
     [ "`/sbin/runlevel`" = "unknown" ] || service $i start
 done
-if [ ! -f /etc/shells ] || ! grep -q '^/usr/sbin/vsh$' /etc/shells ; then
-    echo /usr/sbin/vsh >> /etc/shells
+if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then
+    echo /bin/vsh >> /etc/shells
 fi
 
 %__chattr +t /vservers || :
@@ -107,7 +112,7 @@ fi
 %postun
 # 0 = erase, 1 = upgrade
 if [ "$1" = 0 ] ; then
-    perl -i -n -e 'next if /^\/usr\/sbin\/vsh$/; print' /etc/shells
+    perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
 fi
 
 %preun
@@ -131,9 +136,11 @@ fi
 %config %_initrddir/*
 %config(noreplace) /etc/vservers.conf
 %config(noreplace) /etc/vcached.conf
+/etc/logrotate.d/vcached
 %dir /etc/vservers
 %attr(0,root,root) %dir /vservers
 %attr(4755,root,root) /usr/sbin/vsh
+%attr(4755,root,root) /bin/vsh
 
 %exclude %_sbindir/newvserver
 %exclude %_mandir/man8/newvserver*