ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] Использование control
@ 2003-11-13 20:09 Yura Zotov
  2003-11-14  7:50 ` Епифанов Сергей
  0 siblings, 1 reply; 2+ messages in thread
From: Yura Zotov @ 2003-11-13 20:09 UTC (permalink / raw)
  To: Sisyphus List

Захотелось мне для своих нужд control поиспользовать... Отсюда
вопрос: как средствами control переключать ссылку между двумя
файлами, т.е. в одном состоянии ссылка указывает на один файл, в
другом -- на другой? Может примерчик какой есть?

Заранее спасибо за помощь.


--
Юрий А. Зотов



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sisyphus] Использование control
  2003-11-13 20:09 [sisyphus] Использование control Yura Zotov
@ 2003-11-14  7:50 ` Епифанов Сергей
  0 siblings, 0 replies; 2+ messages in thread
From: Епифанов Сергей @ 2003-11-14  7:50 UTC (permalink / raw)
  To: sisyphus

В сообщении от 13 Ноябрь 2003 23:09 Yura Zotov написал:
> Захотелось мне для своих нужд control поиспользовать... Отсюда
> вопрос: как средствами control переключать ссылку между двумя
> файлами, т.е. в одном состоянии ссылка указывает на один файл, в
> другом -- на другой? Может примерчик какой есть?


В файле, который лежит в /etc/control.d/facilites создать такое:

case "$*" in
type1)
        code 1
        ;;
type2)
        code 2
        ;;
type3)
        code 3
        ;;
esac

code {1,2,3} - обычные команды bash

Тогда по команде control file type1 будет вызван код code 1, например:

rm -f /etc/link1
ln -s /path/to/file /etc/link1

Примеры:
/etc/control.d/facilites/su
/etc/control.d/facilites/mount

-- 
С уважением, Епифанов Сергей


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-14  7:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-13 20:09 [sisyphus] Использование control Yura Zotov
2003-11-14  7:50 ` Епифанов Сергей

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