* [Comm] etcnet.org ? @ 2010-01-31 22:23 Arioch 2010-01-31 22:58 ` Alexey Borovskoy 0 siblings, 1 reply; 21+ messages in thread From: @ 2010-01-31 22:23 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-01-31 22:23 [Comm] etcnet.org ? Arioch @ 2010-01-31 22:58 ` Alexey Borovskoy 2010-02-01 12:40 ` Гусев В.Ю. 0 siblings, 1 reply; 21+ messages in thread From: @ 2010-01-31 22:58 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-01-31 22:58 ` Alexey Borovskoy @ 2010-02-01 12:40 ` Гусев В.Ю. 2010-02-01 13:10 ` Andrey Rahmatullin 0 siblings, 1 reply; 21+ messages in thread From: @ 2010-02-01 12:40 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 12:40 ` Гусев В.Ю. @ 2010-02-01 13:10 ` Andrey Rahmatullin 2010-02-01 18:27 ` Sergey 0 siblings, 1 reply; 21+ messages in thread From: @ 2010-02-01 13:10 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 13:10 ` Andrey Rahmatullin @ 2010-02-01 18:27 ` Sergey 2010-02-01 18:58 ` Andrey Rahmatullin 2010-02-01 19:22 ` Arioch 0 siblings, 2 replies; 21+ messages in thread From: @ 2010-02-01 18:27 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 18:27 ` Sergey @ 2010-02-01 18:58 ` Andrey Rahmatullin 2010-02-01 20:31 ` Sergey 2010-02-01 19:22 ` Arioch 1 sibling, 1 reply; 21+ messages in thread From: @ 2010-02-01 18:58 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 18:58 ` Andrey Rahmatullin @ 2010-02-01 20:31 ` Sergey 2010-02-01 20:34 ` Руслан Писарев 2010-02-01 21:25 ` Andrey Rahmatullin 0 siblings, 2 replies; 21+ messages in thread From: @ 2010-02-01 20:31 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 20:31 ` Sergey @ 2010-02-01 20:34 ` Руслан Писарев 2010-02-01 21:25 ` Andrey Rahmatullin 1 sibling, 0 replies; 21+ messages in thread From: @ 2010-02-01 20:34 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 20:31 ` Sergey 2010-02-01 20:34 ` Руслан Писарев @ 2010-02-01 21:25 ` Andrey Rahmatullin 1 sibling, 0 replies; 21+ messages in thread From: @ 2010-02-01 21:25 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 18:27 ` Sergey 2010-02-01 18:58 ` Andrey Rahmatullin @ 2010-02-01 19:22 ` Arioch 2010-02-01 20:33 ` Sergey ` (2 more replies) 1 sibling, 3 replies; 21+ messages in thread From: @ 2010-02-01 19:22 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 19:22 ` Arioch @ 2010-02-01 20:33 ` Sergey 2010-02-01 21:03 ` [Comm] half-OT: " Arioch 2010-02-02 9:01 ` [Comm] " Dmitry Chistikov 2010-02-08 12:52 ` Michael Shigorin 2 siblings, 1 reply; 21+ messages in thread From: @ 2010-02-01 20:33 UTC (permalink / raw) ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Comm] half-OT: etcnet.org ? 2010-02-01 20:33 ` Sergey @ 2010-02-01 21:03 ` Arioch 0 siblings, 0 replies; 21+ messages in thread From: Arioch @ 2010-02-01 21:03 UTC (permalink / raw) To: community В письме от Mon, 01 Feb 2010 23:33:43 +0300, Sergey <a_s_y@sama.ru> сообщал: подружить бы его с бизибоксом и в акорповые прошивки для раутеров тиа http://www.dealextreme.com/forums/Forums.dx/Forum.29662~threadid.430604 в фирмарях нет пока мейнстрима, м.б. и прижилось бы :-) -- Используется революционный почтовый клиент браузера Opera: http://www.opera.com/mail/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 19:22 ` Arioch 2010-02-01 20:33 ` Sergey @ 2010-02-02 9:01 ` Dmitry Chistikov 2010-02-03 15:40 ` Arioch 2010-02-03 15:44 ` Arioch 2010-02-08 12:52 ` Michael Shigorin 2 siblings, 2 replies; 21+ messages in thread From: Dmitry Chistikov @ 2010-02-02 9:01 UTC (permalink / raw) To: ALT Linux general discussion list > Суть в том, что в баше очень опасны констуркции типа "rm -rf /$FOLDER" > Нет проверки, что $FOLDER установлен. > > И я тогда добавлял сильно извращенную функцию-getter, проверявшую это. (не > нашел в баше встроенной к сожалению) man bash /Parameter Expansion > после того, как какой-то билд etcnet'a не проставил значения переменных и > разроился вместо настроек совершенно дикими глюками, найти причину которых > было не очевидно. Укажите, пожалуйста, номер баги в BTS. -- Дмитрий Чистиков ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-02 9:01 ` [Comm] " Dmitry Chistikov @ 2010-02-03 15:40 ` Arioch 2010-02-03 16:47 ` Dmitry Chistikov 2010-02-03 15:44 ` Arioch 1 sibling, 1 reply; 21+ messages in thread From: Arioch @ 2010-02-03 15:40 UTC (permalink / raw) To: community В письме от Tue, 02 Feb 2010 12:01:43 +0300, Dmitry Chistikov <dd1email@gmail.com> сообщал: > Укажите, пожалуйста, номер баги в BTS. > если пароль восстановится... пока не могу искать если сможете отобрать все баги с таким же автором - https://bugzilla.altlinux.org/show_bug.cgi?id=8095 скорее всего etcnet (еще до роазбиения на 4 пакета), sysiphus 2005-2006 год наверное а зачем, если вы уверяете, что bash сам может выдавтаь ошибку, если нет переменной ? не отдельной стракой а в виде функции либо типа _Get(строка ИмяПеременной) - на выходе либо значение, либо ошибка либо типа _GetDefault(строка ИмяПеременной, значение пол-умолчанию) - на выходе либо значение переменной, либо по-умолчанию делать отдельный проверки перед кажой строкой не интересно, интересно именно тчобы в каждой строке где используются переменные они бы одновременно проверялись. PS: а с busybox'ом совместимости нет и не будет ? -- Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-03 15:40 ` Arioch @ 2010-02-03 16:47 ` Dmitry Chistikov 2010-02-03 19:17 ` Arioch 0 siblings, 1 reply; 21+ messages in thread From: Dmitry Chistikov @ 2010-02-03 16:47 UTC (permalink / raw) To: ALT Linux general discussion list > а зачем, если вы уверяете, что bash сам может выдавтаь ошибку, если нет > переменной ? > не отдельной стракой а в виде функции А отдельной строкой - это как? > либо типа _Get(строка ИмяПеременной) - на выходе либо значение, либо ошибка > либо типа _GetDefault(строка ИмяПеременной, значение пол-умолчанию) - на > выходе либо значение переменной, либо по-умолчанию > > делать отдельный проверки перед кажой строкой не интересно, интересно > именно тчобы в каждой строке где используются переменные они бы > одновременно проверялись. Ну так посмотрите в руководство, я же дал ссылку. -- Дмитрий Чистиков ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-03 16:47 ` Dmitry Chistikov @ 2010-02-03 19:17 ` Arioch 0 siblings, 0 replies; 21+ messages in thread From: Arioch @ 2010-02-03 19:17 UTC (permalink / raw) To: community В письме от Wed, 03 Feb 2010 19:47:16 +0300, Dmitry Chistikov <dd1email@gmail.com> сообщал: >> а зачем, если вы уверяете, что bash сам может выдавтаь ошибку, если нет >> переменной ? >> не отдельной стракой а в виде функции > > А отдельной строкой - это как? ================== Проверка (Переменная1) Проверка (Переменная2) Проверка (Переменная3) Проверка (Переменная4) /usr/sbin/$(Переменная1) -2 -t $(Переменная2) | $(Переменная3) >> $(Переменная1) =================== что-то типа такого, когда код засоряется до плохочитаемости и при изменении кода легко забыть изменение проверок -- Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-02 9:01 ` [Comm] " Dmitry Chistikov 2010-02-03 15:40 ` Arioch @ 2010-02-03 15:44 ` Arioch 1 sibling, 0 replies; 21+ messages in thread From: Arioch @ 2010-02-03 15:44 UTC (permalink / raw) To: community В письме от Tue, 02 Feb 2010 12:01:43 +0300, Dmitry Chistikov <dd1email@gmail.com> сообщал: > > Укажите, пожалуйста, номер баги в BTS. > хотя надо перепроверить что именно сделано, возможно я ошибся https://bugzilla.altlinux.org/show_bug.cgi?id=7765 -- Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-01 19:22 ` Arioch 2010-02-01 20:33 ` Sergey 2010-02-02 9:01 ` [Comm] " Dmitry Chistikov @ 2010-02-08 12:52 ` Michael Shigorin 2010-02-08 13:31 ` Sergey Vlasov 2 siblings, 1 reply; 21+ messages in thread From: Michael Shigorin @ 2010-02-08 12:52 UTC (permalink / raw) To: community On Mon, Feb 01, 2010 at 10:22:35PM +0300, Arioch wrote: > Суть в том, что в баше очень опасны констуркции типа "rm -rf /$FOLDER" > Нет проверки, что $FOLDER установлен. Для этого может быть достаточно чего-то вроде rm -rf /${FOLDER:-delme} -- ---- WBR, Michael Shigorin <mike@altlinux.ru> ------ Linux.Kiev http://www.linux.kiev.ua/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-08 12:52 ` Michael Shigorin @ 2010-02-08 13:31 ` Sergey Vlasov 2010-02-09 17:54 ` Michael Shigorin 2010-02-10 0:48 ` Arioch 0 siblings, 2 replies; 21+ messages in thread From: Sergey Vlasov @ 2010-02-08 13:31 UTC (permalink / raw) To: community [-- Attachment #1: Type: text/plain, Size: 618 bytes --] On Mon, Feb 08, 2010 at 02:52:25PM +0200, Michael Shigorin wrote: > On Mon, Feb 01, 2010 at 10:22:35PM +0300, Arioch wrote: > > Суть в том, что в баше очень опасны констуркции типа "rm -rf /$FOLDER" > > Нет проверки, что $FOLDER установлен. > > Для этого может быть достаточно чего-то вроде > rm -rf /${FOLDER:-delme} Либо ${FOLDER:?FOLDER is unset or null} (выдаёт ошибку как при совсем не установленном параметре, так и при пустой строке); ещё для профилактики использования неустановленных параметров можно установить set -u для всего скрипта (хотя в этом случае пустая строка не считается ошибкой). [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-08 13:31 ` Sergey Vlasov @ 2010-02-09 17:54 ` Michael Shigorin 2010-02-10 0:48 ` Arioch 1 sibling, 0 replies; 21+ messages in thread From: Michael Shigorin @ 2010-02-09 17:54 UTC (permalink / raw) To: community On Mon, Feb 08, 2010 at 04:31:22PM +0300, Sergey Vlasov wrote: > > > Суть в том, что в баше очень опасны констуркции типа > > > "rm -rf /$FOLDER" Нет проверки, что $FOLDER установлен. > > Для этого может быть достаточно чего-то вроде > > rm -rf /${FOLDER:-delme} > Либо ${FOLDER:?FOLDER is unset or null} (выдаёт ошибку как при > совсем не установленном параметре, так и при пустой строке); Во, точно; благодарю. -- ---- WBR, Michael Shigorin <mike@altlinux.ru> ------ Linux.Kiev http://www.linux.kiev.ua/ ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Comm] etcnet.org ? 2010-02-08 13:31 ` Sergey Vlasov 2010-02-09 17:54 ` Michael Shigorin @ 2010-02-10 0:48 ` Arioch 1 sibling, 0 replies; 21+ messages in thread From: Arioch @ 2010-02-10 0:48 UTC (permalink / raw) To: community В письме от Mon, 08 Feb 2010 16:31:22 +0300, Sergey Vlasov <vsu@altlinux.ru> сообщал: > Либо ${FOLDER:?FOLDER is unset or null} (выдаёт ошибку как при совсем > не установленном параметре, так и при пустой строке); вообще для постоянного использования неудобно. во-первых очень длинно, плохочитаемо (а три-четыре параметра в строке?) во-вторых могут быть опечатки типа ${FOLDER:?FOLDFR .... впрочем, то что я внутрь функции загнал - много страшнее по сути. но зато сам вызов относительно аккуратный и однозначный. -- Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/ ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2010-02-10 0:48 UTC | newest] Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-01-31 22:23 [Comm] etcnet.org ? Arioch 2010-01-31 22:58 ` Alexey Borovskoy 2010-02-01 12:40 ` Гусев В.Ю. 2010-02-01 13:10 ` Andrey Rahmatullin 2010-02-01 18:27 ` Sergey 2010-02-01 18:58 ` Andrey Rahmatullin 2010-02-01 20:31 ` Sergey 2010-02-01 20:34 ` Руслан Писарев 2010-02-01 21:25 ` Andrey Rahmatullin 2010-02-01 19:22 ` Arioch 2010-02-01 20:33 ` Sergey 2010-02-01 21:03 ` [Comm] half-OT: " Arioch 2010-02-02 9:01 ` [Comm] " Dmitry Chistikov 2010-02-03 15:40 ` Arioch 2010-02-03 16:47 ` Dmitry Chistikov 2010-02-03 19:17 ` Arioch 2010-02-03 15:44 ` Arioch 2010-02-08 12:52 ` Michael Shigorin 2010-02-08 13:31 ` Sergey Vlasov 2010-02-09 17:54 ` Michael Shigorin 2010-02-10 0:48 ` Arioch
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git