From: Yura Zotov <yz@altlinux.ru> To: Sisyphus List <sisyphus@altlinux.ru> Subject: [sisyphus] ez-ipupdate: критика Date: Sat, 29 May 2004 22:27:05 +0400 Message-ID: <20040529182705.GA10922@home-pool-173-97.com2com.ru> (raw) [-- Attachment #1: Type: text/plain, Size: 650 bytes --] Обнаружил, что инитскрипт для ez-ipupdate срабатывает с ошибками. Разборки выявили как банальные опечатки, так и более принципиальные недочёты. На основе этого скрипта и /etc/init.d/template я написал новый скрипт, который работает как положено. Он прицеплен. Предлагаю включить в пакет ez-ipupdate новый скрипт вместо старого. P.S. Не совсем понял, какой смысл в выделении файла ez-ipupdate.pid в отдельный каталог /var/run/ez-ipupdate/. По-моему его было бы правильнее держать вместе с остальными pid-файлами в /var/run/. Ведь с lock-файлом вы (обращение к мантейнеру пакета) так и поступали, оставляя его в /var/lock/subsys/. -- Юрий А. Зотов [-- Attachment #2: ez-ipupdate --] [-- Type: text/plain, Size: 1952 bytes --] #!/bin/sh # # ez-ipupdate Starts and stops the ez-ipupdate daemon # # chkconfig: - 55 45 # # processname: ez-ipupdate # description: Check and update your IP to dynamic DNS Server. # pidfile: /var/run/ez-ipupdate/ez-ipudpate.pid # config: /etc/ez-ipupdate.conf EZ_CONFIG=/etc/ez-ipupdate.conf EZ_BIN=/usr/sbin/ez-ipupdate EZ_PID=/var/run/ez-ipupdate/ez-ipupdate.pid PROG=ez-ipupdate LOCKFILE="/var/lock/subsys/$PROG" # Make sure relevant files exist [ -x "$EZ_BIN" -a -s "$EZ_CONFIG" ] || exit 0 # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ "$NETWORKING" = "no" ] && exit 0 RETVAL=0 start() { # Start daemons. start_daemon --pidfile "$EZ_PID" --lockfile "$LOCKFILE" -- "$EZ_BIN" --daemon --config-file "$EZ_CONFIG" --pid-file "$EZ_PID" RETVAL=$? return $RETVAL } stop() { # Stop daemons. stop_daemon --pidfile "$EZ_PID" --lockfile "$LOCKFILE" -- "$PROG" RETVAL=$? return $RETVAL } reload() { # Reload config by sending a SIGHUP. msg_reloading "$PROG" stop_daemon --pidfile "$EZ_PID" -HUP -- "$PROG" RETVAL=$? echo } restart() { stop start RETVAL=$? } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; condstop) if [ -e "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -e "$LOCKFILE" ]; then restart fi ;; condreload) if [ -e "$LOCKFILE" ]; then reload fi ;; status) status --pidfile $EZ_PID $PROG RETVAL=$? if [ -r $EZ_CONFIG ]; then ez_cache=`grep -E '^[[:space:]]*cache-file' $EZ_CONFIG | cut -d "=" -f2` [ -n "$ez_cache" ] && \ echo "Last IP update: "`cat $ez_cache | cut -d "," -f2` fi ;; *) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" RETVAL=1 esac exit $RETVAL
next reply other threads:[~2004-05-29 18:27 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-05-29 18:27 Yura Zotov [this message] 2004-05-31 18:43 ` [sisyphus] " Michael Shigorin 2004-05-31 19:57 ` Yura Zotov 2004-06-01 13:43 ` [sisyphus] " sergey ivanov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040529182705.GA10922@home-pool-173-97.com2com.ru \ --to=yz@altlinux.ru \ --cc=sisyphus@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git