wok-6.x rev 16681
Create some /var/run/<dir> in /etc/init.d/<daemon> scritps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun May 18 20:24:07 2014 +0000 (2014-05-18) |
parents | 9e29d7944214 |
children | b9c6c8240bba |
files | c_icap/receipt c_icap/stuff/c-icapd distcc/receipt distcc/stuff/distccd dovecot/receipt dovecot/stuff/init.d/dovecot mariadb/receipt mariadb/stuff/etc/init.d/mysql mysql/receipt mysql/stuff/etc/init.d/mysql nagios-nrpe/receipt nagios-nrpe/stuff/nrpe nagios/receipt nagios/stuff/nagios ndoutils/receipt ndoutils/stuff/etc/init.d/ndo2db openerp-server/receipt openerp-server/stuff/etc/init.d/openerp-server openssh-pam/receipt openssh/receipt openssh/stuff/openssh openvpn/receipt openvpn/stuff/etc/init.d/openvpn-client openvpn/stuff/etc/init.d/openvpn-server samba/stuff/etc/init.d/samba |
line diff
1.1 --- a/c_icap/receipt Sun May 18 19:16:29 2014 +0000 1.2 +++ b/c_icap/receipt Sun May 18 20:24:07 2014 +0000 1.3 @@ -26,8 +26,7 @@ 1.4 { 1.5 mkdir -p $fs/usr/lib/$PACKAGE \ 1.6 $fs/etc/init.d \ 1.7 - $fs/var/log/c-icap \ 1.8 - $fs/var/run/c-icap 1.9 + $fs/var/log/c-icap 1.10 1.11 cp -a $install/usr/bin $fs/usr 1.12 cp -a $install/usr/lib/*.so* $fs/usr/lib
2.1 --- a/c_icap/stuff/c-icapd Sun May 18 19:16:29 2014 +0000 2.2 +++ b/c_icap/stuff/c-icapd Sun May 18 20:24:07 2014 +0000 2.3 @@ -14,6 +14,7 @@ 2.4 OPTIONS="" 2.5 PIDFILE=/var/run/c-icap/c-icap.pid 2.6 2.7 +[ -d /var/run/c-icap ] || mkdir -p /var/run/c-icap 2.8 case "$1" in 2.9 start) 2.10 if active_pidfile $PIDFILE $NAME ; then
3.1 --- a/distcc/receipt Sun May 18 19:16:29 2014 +0000 3.2 +++ b/distcc/receipt Sun May 18 20:24:07 2014 +0000 3.3 @@ -34,7 +34,6 @@ 3.4 { 3.5 mkdir -p $fs/usr \ 3.6 $fs/var/log/distccd \ 3.7 - $fs/var/run/distccd \ 3.8 $fs/etc/init.d 3.9 3.10 cp -a $install/usr/bin $fs/usr 3.11 @@ -55,8 +54,7 @@ 3.12 fi 3.13 3.14 # Fix perms for files and directories 3.15 - chroot $1/ chown -R distcc.distcc /var/log/distccd \ 3.16 - /var/run/distccd 3.17 + chroot $1/ chown -R distcc.distcc /var/log/distccd 3.18 3.19 cat <<EOF 3.20 ----
4.1 --- a/distcc/stuff/distccd Sun May 18 19:16:29 2014 +0000 4.2 +++ b/distcc/stuff/distccd Sun May 18 20:24:07 2014 +0000 4.3 @@ -28,6 +28,10 @@ 4.4 JOB=4 4.5 OPTIONS="--daemon --verbose -j $JOB $ALLOW --pid-file $PIDFILE --log-file $LOGFILE" 4.6 4.7 +if [ ! -d /var/run/distccd ]; then 4.8 + mkdir -p /var/run/distccd 4.9 + chown distccd.distccd /var/run/distccd 4.10 +fi 4.11 case "$1" in 4.12 start) 4.13 if active_pidfile $PIDFILE distccd ; then
5.1 --- a/dovecot/receipt Sun May 18 19:16:29 2014 +0000 5.2 +++ b/dovecot/receipt Sun May 18 20:24:07 2014 +0000 5.3 @@ -39,7 +39,6 @@ 5.4 { 5.5 mkdir -p $fs/usr/lib \ 5.6 $fs/var/log/dovecot \ 5.7 - $fs/var/run/dovecot \ 5.8 $fs/etc/ssl/misc 5.9 5.10 5.11 @@ -94,7 +93,6 @@ 5.12 5.13 # Set perms for files and directories 5.14 chroot $1/ chown -R ${user}.${group} /var/log/${user} \ 5.15 - /var/run/${user} 5.16 5.17 cat <<EOF 5.18 ----
6.1 --- a/dovecot/stuff/init.d/dovecot Sun May 18 19:16:29 2014 +0000 6.2 +++ b/dovecot/stuff/init.d/dovecot Sun May 18 20:24:07 2014 +0000 6.3 @@ -14,6 +14,10 @@ 6.4 OPTIONS=$dovecot_OPTIONS 6.5 PIDFILE=/var/run/dovecot/master.pid 6.6 6.7 +if [ ! -d /var/run/dovecot ]; then 6.8 + mkdir -p /var/run/dovecot 6.9 + chown dovecot.dovecot /var/run/dovecot 6.10 +fi 6.11 case "$1" in 6.12 start) 6.13 if active_pidfile $PIDFILE dovecot ; then
7.1 --- a/mariadb/receipt Sun May 18 19:16:29 2014 +0000 7.2 +++ b/mariadb/receipt Sun May 18 20:24:07 2014 +0000 7.3 @@ -90,9 +90,6 @@ 7.4 status 7.5 fi 7.6 7.7 - mkdir -p $1/var/run/mysqld 7.8 - chroot $1/ chown -R ${user}.${group} /var/lib/mysql /var/run/mysqld 7.9 - 7.10 cat <<EOF 7.11 ---- 7.12 To start $PACKAGE server you can run :
8.1 --- a/mariadb/stuff/etc/init.d/mysql Sun May 18 19:16:29 2014 +0000 8.2 +++ b/mariadb/stuff/etc/init.d/mysql Sun May 18 20:24:07 2014 +0000 8.3 @@ -15,6 +15,10 @@ 8.4 PIDFILE=/var/run/mysqld/mysql.pid 8.5 [ -n "$OPTIONS" ] || OPTIONS="--pid-file=$PIDFILE --datadir=/var/lib/mysql --user=mysql --socket=/var/run/mysqld/mysqld.sock" 8.6 8.7 +if [ ! -d /var/lib/mysql ]; then 8.8 + mkdir -p /var/lib/mysql 8.9 + chown mysql.mysql /var/lib/mysql 8.10 +fi 8.11 case "$1" in 8.12 start) 8.13 if active_pidfile $PIDFILE mysqld ; then
9.1 --- a/mysql/receipt Sun May 18 19:16:29 2014 +0000 9.2 +++ b/mysql/receipt Sun May 18 20:24:07 2014 +0000 9.3 @@ -115,8 +115,7 @@ 9.4 status 9.5 fi 9.6 #chroot $1/ /bin/chown ${user}.${group} $(cat $1/$INSTALLED/$PACKAGE/files.list) 9.7 - mkdir -p $1/var/run/mysqld 2> /dev/null 9.8 - chroot "$1/" /bin/chown -R ${user}.${group} /var/lib/mysql /var/run/mysqld 9.9 + chroot "$1/" /bin/chown -R ${user}.${group} /var/lib/mysql 9.10 chroot "$1/" mysql_install_db --user=${user} --basedir=/usr 9.11 cat <<EOF 9.12 ----
10.1 --- a/mysql/stuff/etc/init.d/mysql Sun May 18 19:16:29 2014 +0000 10.2 +++ b/mysql/stuff/etc/init.d/mysql Sun May 18 20:24:07 2014 +0000 10.3 @@ -15,6 +15,10 @@ 10.4 PIDFILE=/var/run/mysqld/mysql.pid 10.5 [ -n "$OPTIONS" ] || OPTIONS="--pid-file=$PIDFILE --datadir=/var/lib/mysql --user=mysql --socket=/var/run/mysqld/mysqld.sock" 10.6 10.7 +if [ ! -d /var/lib/mysql ]; then 10.8 + mkdir -p /var/lib/mysql 10.9 + chown mysql.mysql /var/lib/mysql 10.10 +fi 10.11 case "$1" in 10.12 start) 10.13 if active_pidfile $PIDFILE mysqld ; then
11.1 --- a/nagios-nrpe/receipt Sun May 18 19:16:29 2014 +0000 11.2 +++ b/nagios-nrpe/receipt Sun May 18 20:24:07 2014 +0000 11.3 @@ -46,8 +46,7 @@ 11.4 genpkg_rules() 11.5 { 11.6 mkdir -p $fs/etc/nagios/objects \ 11.7 - $fs/etc/init.d \ 11.8 - $fs/var/run/nagios 11.9 + $fs/etc/init.d 11.10 11.11 cp -a $install/usr $fs 11.12 install -m 0644 $src/sample-config/nrpe.cfg $fs/etc/nagios 11.13 @@ -67,7 +66,7 @@ 11.14 fi 11.15 11.16 # Set perms for files and directories 11.17 - chroot $1/ chown -R nagios.nagios /usr/lib/nagios/plugins /var/run/nagios 11.18 + chroot $1/ chown -R nagios.nagios /usr/lib/nagios/plugins 11.19 chroot $1/ chown nagios.nagios /etc/nagios/* 11.20 11.21 # Add check_nrpe in nagios config file
12.1 --- a/nagios-nrpe/stuff/nrpe Sun May 18 19:16:29 2014 +0000 12.2 +++ b/nagios-nrpe/stuff/nrpe Sun May 18 20:24:07 2014 +0000 12.3 @@ -15,6 +15,10 @@ 12.4 OPTIONS="-n -c $CONFIG_FILE -d" 12.5 PIDFILE=/var/run/nagios/nrpe.pid 12.6 12.7 +if [ ! -d /var/run/nagios ]; then 12.8 + mkdir -p /var/run/nagios 12.9 + chown nagios.nagios /var/run/nagios 12.10 +fi 12.11 case "$1" in 12.12 start) 12.13 if active_pidfile $PIDFILE nrpe ; then
13.1 --- a/nagios/receipt Sun May 18 19:16:29 2014 +0000 13.2 +++ b/nagios/receipt Sun May 18 20:24:07 2014 +0000 13.3 @@ -59,7 +59,6 @@ 13.4 { 13.5 mkdir -p $fs/usr $fs/etc/init.d \ 13.6 $fs/var/lib/nagios/rw \ 13.7 - $fs/var/run/nagios \ 13.8 $fs/var/log/nagios \ 13.9 $fs/var/spool/nagios/checkresults \ 13.10 $fs/etc/apache 13.11 @@ -94,7 +93,6 @@ 13.12 13.13 # Fix perms for files and directories 13.14 chroot $1/ chown -R nagios.nagios /var/log/nagios \ 13.15 - /var/run/nagios \ 13.16 /var/spool/nagios \ 13.17 /var/lib/nagios \ 13.18 /usr/share/nagios \
14.1 --- a/nagios/stuff/nagios Sun May 18 19:16:29 2014 +0000 14.2 +++ b/nagios/stuff/nagios Sun May 18 20:24:07 2014 +0000 14.3 @@ -20,6 +20,10 @@ 14.4 $DAEMON -v $CONFIG_FILE 14.5 } 14.6 14.7 +if [ ! -d /var/run/nagios ]; then 14.8 + mkdir -p /var/run/nagios 14.9 + chown nagios.nagios /var/run/nagios 14.10 +fi 14.11 case "$1" in 14.12 start) 14.13 if active_pidfile $PIDFILE nagios ; then
15.1 --- a/ndoutils/receipt Sun May 18 19:16:29 2014 +0000 15.2 +++ b/ndoutils/receipt Sun May 18 20:24:07 2014 +0000 15.3 @@ -45,7 +45,6 @@ 15.4 { 15.5 mkdir -p $fs/usr/share/nagios/ndoutils \ 15.6 $fs/etc/nagios \ 15.7 - $fs/var/run/nagios \ 15.8 $fs/etc/mysql.d 15.9 15.10 cp -a $install/usr/bin $fs/usr 15.11 @@ -86,7 +85,7 @@ 15.12 15.13 chroot $1/ chown nagios.nagios $fs/usr/lib/ndoutils/ndomod.o \ 15.14 $fs/etc/nagios/ndo2db.cfg $fs/etc/nagios/ndomod.cfg \ 15.15 - $fs/var/run/nagios $fs/etc/nagios 15.16 + $fs/etc/nagios 15.17 15.18 sed -i "s/nagios/ndo2db nagios/" $1/etc/rcS.conf 15.19
16.1 --- a/ndoutils/stuff/etc/init.d/ndo2db Sun May 18 19:16:29 2014 +0000 16.2 +++ b/ndoutils/stuff/etc/init.d/ndo2db Sun May 18 20:24:07 2014 +0000 16.3 @@ -90,6 +90,10 @@ 16.4 exit 1 16.5 fi 16.6 16.7 +if [ ! -d /var/run/nagios ]; then 16.8 + mkdir -p /var/run/nagios 16.9 + chown nagios.nagios /var/run/nagios 16.10 +fi 16.11 # See how we were called. 16.12 case "$1" in 16.13
17.1 --- a/openerp-server/receipt Sun May 18 19:16:29 2014 +0000 17.2 +++ b/openerp-server/receipt Sun May 18 20:24:07 2014 +0000 17.3 @@ -26,8 +26,8 @@ 17.4 # Rules to gen a SliTaz package suitable for Tazpkg. 17.5 genpkg_rules() 17.6 { 17.7 - mkdir -p $fs/usr $fs/var/run/openerp $fs/var/log/openerp 17.8 - chmod 777 $fs/var/run/openerp $fs/var/log/openerp 17.9 + mkdir -p $fs/usr $fs/var/log/openerp 17.10 + chmod 777 $fs/var/log/openerp 17.11 cp -a $install/usr/bin $fs/usr 17.12 cp -a $install/usr/lib $fs/usr 17.13 cp -a $stuff/* $fs
18.1 --- a/openerp-server/stuff/etc/init.d/openerp-server Sun May 18 19:16:29 2014 +0000 18.2 +++ b/openerp-server/stuff/etc/init.d/openerp-server Sun May 18 20:24:07 2014 +0000 18.3 @@ -23,6 +23,10 @@ 18.4 OPTIONS="$OPTIONS -l $LANG" 18.5 fi 18.6 18.7 +if [ ! -d /var/run/openerp ]; then 18.8 + mkdir -p /var/run/openerp 18.9 + chmod 777 /var/run/openerp 18.10 +fi 18.11 case "$1" in 18.12 start) 18.13 if active_pidfile $PIDFILE python ; then
19.1 --- a/openssh-pam/receipt Sun May 18 19:16:29 2014 +0000 19.2 +++ b/openssh-pam/receipt Sun May 18 20:24:07 2014 +0000 19.3 @@ -39,12 +39,6 @@ 19.4 sed -i 's/.*UsePAM.*/UsePAM yes/' $fs/etc/ssh/sshd_config 19.5 } 19.6 19.7 -# Pre and post install commands for Tazpkg. 19.8 -pre_install() 19.9 -{ 19.10 - mkdir -p $1/var/run/sshd 19.11 -} 19.12 - 19.13 post_install() 19.14 { 19.15 [ "$1" ] || while read dropbear openssh ; do 19.16 @@ -57,9 +51,3 @@ 19.17 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key 19.18 EOT 19.19 } 19.20 - 19.21 -# Pre and post remove commands for Tazpkg. 19.22 -post_remove() 19.23 -{ 19.24 - rm -fr $1/var/run/sshd 19.25 -}
20.1 --- a/openssh/receipt Sun May 18 19:16:29 2014 +0000 20.2 +++ b/openssh/receipt Sun May 18 20:24:07 2014 +0000 20.3 @@ -46,12 +46,6 @@ 20.4 $fs/etc/ssh/sshd_config 20.5 } 20.6 20.7 -# Pre and post install commands for Tazpkg. 20.8 -pre_install() 20.9 -{ 20.10 - mkdir -p $1/var/run/sshd 20.11 -} 20.12 - 20.13 post_install() 20.14 { 20.15 [ "$1" ] || while read dropbear openssh ; do 20.16 @@ -64,10 +58,3 @@ 20.17 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key 20.18 EOT 20.19 } 20.20 - 20.21 -# Pre and post remove commands for Tazpkg. 20.22 -post_remove() 20.23 -{ 20.24 - rm -fr $1/var/run/sshd 20.25 -} 20.26 -
21.1 --- a/openssh/stuff/openssh Sun May 18 19:16:29 2014 +0000 21.2 +++ b/openssh/stuff/openssh Sun May 18 20:24:07 2014 +0000 21.3 @@ -14,6 +14,7 @@ 21.4 OPTIONS=$OPENSSH_OPTIONS 21.5 PIDFILE=/var/run/sshd.pid 21.6 21.7 +[ -d /var/run/sshd ] || mkdir -p /var/run/sshd 21.8 case "$1" in 21.9 start) 21.10 # We need rsa and dsa host key file to start dropbear.
22.1 --- a/openvpn/receipt Sun May 18 19:16:29 2014 +0000 22.2 +++ b/openvpn/receipt Sun May 18 20:24:07 2014 +0000 22.3 @@ -39,15 +39,9 @@ 22.4 chmod 0644 $fs/etc/openvpn/openvpn.conf 22.5 } 22.6 22.7 -# Post install/remove commands for Tazpkg. 22.8 -post_install() 22.9 +post_remove() 22.10 { 22.11 - mkdir -p ${root}/var/run/openvpn 22.12 + # remove config 22.13 + rm -rf ${root}/etc/openvpn 22.14 } 22.15 22.16 -post_remove() 22.17 -{ 22.18 - # remove config and pids 22.19 - rm -rf ${root}/etc/openvpn ${root}/var/run/openvpn 22.20 -} 22.21 -
23.1 --- a/openvpn/stuff/etc/init.d/openvpn-client Sun May 18 19:16:29 2014 +0000 23.2 +++ b/openvpn/stuff/etc/init.d/openvpn-client Sun May 18 20:24:07 2014 +0000 23.3 @@ -1,5 +1,5 @@ 23.4 #!/bin/sh 23.5 -# /etc/init.d/rsyncd: Start, stop and restart Rsync deamon on SliTaz, at boot 23.6 +# /etc/init.d/openvpn-client: Start, stop and restart openvpn deamon on SliTaz, at boot 23.7 # time or with the command line. 23.8 # 23.9 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS 23.10 @@ -12,7 +12,7 @@ 23.11 DESC="VPN daemon" 23.12 DAEMON=/usr/sbin/openvpn 23.13 OPTIONS=$OPENVPN_OPTIONS 23.14 -PIDFILE=/var/run/rsyncd.pid 23.15 +PIDFILE=/var/run/openvpni-client.pid 23.16 23.17 checktundevice() { 23.18 if [ ! -e /dev/net/tun ]; then 23.19 @@ -28,6 +28,7 @@ 23.20 fi 23.21 } 23.22 23.23 +[ -d /var/run/openvpn ] || mkdir -p /var/run/openvpn 23.24 case "$1" in 23.25 start) 23.26 checktundevice
24.1 --- a/openvpn/stuff/etc/init.d/openvpn-server Sun May 18 19:16:29 2014 +0000 24.2 +++ b/openvpn/stuff/etc/init.d/openvpn-server Sun May 18 20:24:07 2014 +0000 24.3 @@ -1,5 +1,5 @@ 24.4 #!/bin/sh 24.5 -# /etc/init.d/rsyncd: Start, stop and restart Rsync deamon on SliTaz, at boot 24.6 +# /etc/init.d/openvpn-server: Start, stop and restart openvpn deamon on SliTaz, at boot 24.7 # time or with the command line. 24.8 # 24.9 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS 24.10 @@ -12,7 +12,7 @@ 24.11 DESC="VPN daemon" 24.12 DAEMON=/usr/sbin/openvpn 24.13 OPTIONS=$OPENVPN_OPTIONS 24.14 -PIDFILE=/var/run/rsyncd.pid 24.15 +PIDFILE=/var/run/openvpn-server.pid 24.16 24.17 checktundevice() { 24.18 if [ ! -e /dev/net/tun ]; then 24.19 @@ -28,6 +28,7 @@ 24.20 fi 24.21 } 24.22 24.23 +[ -d /var/run/openvpn ] || mkdir -p /var/run/openvpn 24.24 case "$1" in 24.25 start) 24.26 checktundevice
25.1 --- a/samba/stuff/etc/init.d/samba Sun May 18 19:16:29 2014 +0000 25.2 +++ b/samba/stuff/etc/init.d/samba Sun May 18 20:24:07 2014 +0000 25.3 @@ -15,6 +15,7 @@ 25.4 NMBPIDFILE=/var/run/samba/nmbd.pid 25.5 SMBPIDFILE=/var/run/samba/smbd.pid 25.6 25.7 +[ -d /var/run/samba ] || mkdir -p /var/run/samba 25.8 case "$1" in 25.9 start) 25.10 if active_pidfile $SMBPIDFILE smbd ; then