ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Artem <u2u@nm.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: [sisyphus] init - скрипты, и возвращаемые значения
Date: Mon, 07 Nov 2005 17:51:27 +0200
Message-ID: <436F77FF.6060901@nm.ru> (raw)

Доброго всем времени суток.
Что-то не могу понять, почему так получается:

часть init-cкрипта, стартуем slmodemd
start()
{
         action "Starting slmodem daemon: " start-stop-daemon --quiet 
--start -b -m --pidfile $PIDFILE --exec /usr/sbin/slmodemd -- 
--country=RUSSIA
         RETVAL=$?
         echo "Return: $RETVAL"
         return $RETVAL
}

в результате:

service slmodemd start
Starting slmodem daemon: 
              [ DONE ]
Return: 0
[root@localhost init.d]#

Однако - он на самом деле не запускается (и правильно делает) - не 
хватает параметров (см. ниже) - а скрипт выдает "DONE" ? Что за %^&#@ ?

/usr/sbin/slmodemd --country=RUSSIA
error: mdm setup: cannot open dev `/dev/slamr0': No such device or address
error: cannot setup device `/dev/slamr0'
[root@localhost init.d]# echo $?
1
[root@localhost init.d]#

и в довершение

/usr/sbin/slmodemd --alsa --country=RUSSIA
SmartLink Soft Modem: version 2.9.10 Nov  7 2005 17:35:14
symbolic link `/dev/ttySLM0' -> `/dev/pts/15' created.
modem `modem:1' created. TTY is `/dev/pts/15'
Use `/dev/ttySLM0' as modem device, Ctrl+C for termination.
(прерываю по ctrl+c)
[root@localhost init.d]# echo $?
0
[root@localhost init.d]#

Почему же в init скрипте ошибка не возвращается (т.е. - "1") ?

Rgds, Artem.


             reply	other threads:[~2005-11-07 15:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-07 15:51 Artem [this message]
2005-11-07 16:53 ` Sviataslau Svirydau
2005-11-07 17:19   ` Artem
2005-11-07 17:31     ` Sviataslau Svirydau
2005-11-07 17:46       ` Artem
2005-11-07 18:29         ` Sviataslau Svirydau
2005-11-07 23:05           ` Artem
2005-11-07 18:30         ` Sviataslau Svirydau

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=436F77FF.6060901@nm.ru \
    --to=u2u@nm.ru \
    --cc=sisyphus@lists.altlinux.org \
    /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