Date: Sun, 5 Aug 2007 14:23:16 +0200 From: =?utf-8?Q?Daniel_Dvo=C5=99=C3=A1k?= <dandee@hellteam.net> To: <ports@FreeBSD.org> Subject: FW: FreeBSD Port: uptimed-0.3.7 Message-ID: <000501c7d75b$66b93cc0$6508280a@tocnet28.jspoj.czf>
next in thread | raw e-mail | index | archive | help
I have no response, so I try to send to public. =20 _____ =20 From: Daniel Dvo=C5=99=C3=A1k [mailto:dandee@hellteam.net]=20 Sent: Friday, August 03, 2007 11:09 PM To: 'andy@athame.co.uk' Subject: FreeBSD Port: uptimed-0.3.7 =20 Hi Andy, =20 I ask you about updating uptimed to the last release 0.3.11. =20 Radek P. is my friend and I show him what the startting script in fbsd = porttree is, he was surprised a little bit about older our 0.3.7 = release. =20 The main problem is with pid file and uptimed.sh script as whole. =20 See this: =20 # /etc2/rc.d/uptimed.sh stop # /etc2/rc.d/uptimed.sh start uptimeduptimed is already running. # /etc2/rc.d/uptimed.sh stop # ps aux | grep "uptimed" root 91399 0,0 0,8 1564 948 p0 R+ 10:04od 0:00,03 grep = uptimed # /etc2/rc.d/uptimed.sh start uptimeduptimed is already running. # ps aux | grep "uptimed" root 91406 0,0 0,7 1548 872 p0 R+ 10:05od 0:00,02 grep = uptimed =20 I had to use =E2=80=9Ekillall uptimed=E2=80=9C to really stop it. =20 This is our latest script: =20 #!/bin/sh case "$1" in start) echo -n ' uptimed' /usr/local/sbin/uptimed ;; stop) ;; restart) ;; *) echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1 exit 65 ;; esac =20 =20 And Radek has in his sources this much newer code with status. To be = perfect it should have rcvar option. =20 http://hg.podgorny.cz/uptimed/file/ccbad14594ae/etc/rc.uptimed =20 case "$1" in 69 start) 70 start 71 ;; 72 stop) 73 stop 74 ;; 75 restart) 76 stop 77 start 78 ;; 79 createbootid) 80 createbootid 81 ;; 82 status) 83 showstatus 84 ;; 85 *) 86 echo $"Usage: $0 = {start|stop|restart|createbootid|status}" 87 RETVAL=3D1 88esac 89exit $RETVAL =20 =20 I think this code above is good point to start and adjust our modern = uptimed startting script with rc rules for our needs. =20 I ask you more than I could, becuse my contribution is almost none, but = at least new modern startting script with whole status and rcvar stuff = under new rc rules would be great. =20 Perhaps I do not bother you more than necessary. =20 Thanks =20 Bye =20 Dan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000501c7d75b$66b93cc0$6508280a>