ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] скрипты
@ 2003-02-20 12:57 Stanislav Ievlev
  2003-02-20 14:08 ` [devel] скрипты (LinPopUp) Grigory Batalov
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Stanislav Ievlev @ 2003-02-20 12:57 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

Привет всем!

Пригалаю список скриптов в пакетах rpm, показавшийся мне подозрительным.
Вполне возможно, что я где-то был не прав. В любом случае хочется
комментариев от мантейнеров.

--
Станислав Иевлев.


[-- Attachment #2: bad_scripts --]
[-- Type: text/plain, Size: 7880 bytes --]


LinPopUp :
if [ ! -f /var/lib/linpopup/messages.dat ]; then touch /var/lib/linpopup/messages.dat; chmod 0666 /var/lib/linpopup/messages.dat; chgrp nobody /var/lib/linpopup/messages.dat; else :; fi;
Zope-ZUtils :
if [ -e "/var/lib/zope/basic" ]; then echo "Basic site already exist and will not be upgareded"; else /usr/sbin/addzopesite.py basic 8000; fi;
exult:
postinstall scriptlet (through /bin/sh): chmod a+rx /usr/share/exult
golded+ :
postinstall scriptlet (through /bin/sh): for i in golded.log; do if [ ! -f "/var/log/ftn/$i" ]; then
 :>> "/var/log/ftn/$i" /bin/chown ftn:ftn "/var/log/ftn/$i" /bin/chmod 660 "/var/log/ftn/$i" fi done
  ||:
Зачем такой хак да еще и с такими правами?
 
gtklp :
postinstall scriptlet (through /bin/sh): [ -x /usr/bin/update-menus ] && /usr/bin/update-menus ||: #
Make CUPS settings compatible... /bin/mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf~ /bin/cat /etc/cu
ps/cupsd.conf~ | /bin/sed -e s/\#RunAsUser\ no/RunAsUser\ no/ -e s/\#NoIzvrat\ yes/NoIzvrat\ yes/ > 
/etc/cups/cupsd.conf service cups restart postuninstall scriptlet (through /bin/sh): [ "$1" = 0 -a -
x /usr/bin/update-menus ] && /usr/bin/update-menus ||:

Вячеслав, ну Вы уже перестали меня удивлять ;)

inn :
postinstall scriptlet (through /bin/sh): if [ `/bin/cat /etc/news/inn.conf | /bin/grep '^server:' | 
wc -l` -lt 1 ]; then echo "server: `hostname -f`" >> /etc/news/inn.conf fi

Зачем свой собственный конфиг править?


isdn4net :
preuninstall scriptlet (through /bin/sh): echo -n "Deactivating isdn4linux card init:" /sbin/chkconf
ig --del isdnlog /sbin/chkconfig --del isdn4linux echo " done."

Явно не используется post/preun_service

jabber :
preinstall scriptlet (through /bin/sh): /usr/sbin/groupadd -r -f jabber \ 2>/dev/null ||: /usr/sbin/
useradd -r -g jabber -c 'Jabber server' -d /var/lib/jabber \ -s /dev/null jabber 2>/dev/null ||: pos
tinstall scriptlet (through /bin/sh): /bin/chown -R jabber /var/lib/jabber /bin/chown -R jabber /var
/log/jabber /bin/chown -R jabber /var/run/jabber /bin/chgrp -R jabber /var/lib/jabber /bin/chgrp -R 
jabber /var/log/jabber /bin/chgrp -R jabber /var/run/jabber if [ $1 = 1 ]; then /sbin/chkconfig --ad
d jabber else /sbin/service jabber condrestart ||: fi preuninstall scriptlet (through /bin/sh): if [
 $1 = 0 ]; then /sbin/chkconfig --del jabber ||: /sbin/service jabber condstop ||: fi

Зачем такие хаки? Может быть в триггер?

krb5-server :
postinstall scriptlet (through /bin/sh): # Remove the init script for older servers. [ -x /etc/rc.d/
init.d/krb5server ] && /sbin/chkconfig --del krb5server # Install the new ones. for i in krb5kdc kad
min krb524 kprop; do /sbin/chkconfig --add $i done

Явно не используется post/preun_service? Какой в этом грубинный смысл?

leafnode :
postinstall scriptlet (through /bin/sh): # get hostname to config -- works for first time fgrep -q h
ost.domain.country /etc/leafnode/config && { SERVERNAME=`hostname` [ -z "$SERVERNAME" ] && SERVERNAM
E="localhost" TMP=`mktemp -q leafnode-config-XXXXXXXXXX` [ $? = 0 ] && sed -e "s,host.domain.country
,$SERVERNAME,g" < /etc/leafnode/config > $TMP && \ cat $TMP > /etc/leafnode/config && rm $TMP } || :
 # TODO: use news for texpire? # TODO: config dir should be better guarded probably?

Зачем свой собственный конфиг править?

libcomedi :
postinstall scriptlet (through /sbin/ldconfig): cd /usr/lib ln -sf libcomedi.so.0.7.19 libcomedi.so 
ln -sf libcomedi.so.0.7.19 libcomedi.so.0 cd - postuninstall program: /sbin/ldconfig

А это что за хак? Может лучше правильный soname дать программе?

libfftw-devel :
postinstall scriptlet (through /bin/sh): /sbin/install-info --entry '* FFTW: (fftw). Fast Fourier Tr
ansform library.'\ --section Libraries /usr/share/info/fftw.info.gz /usr/share/info/dir postuninstal
l scriptlet (through /bin/sh): /sbin/install-info --entry '* FFTW: (fftw). Fast Fourier Transform li
brary.'\ --section Libraries --remove /usr/share/info/fftw.info.gz /usr/share/info/dir

Явно не используется макрос install_info.

libkrb5 :
postinstall scriptlet (through /bin/sh): if [ $1 = 1 ] ; then /bin/grep -Fq /usr/lib/krb5 /etc/ld.so
.conf || echo "/usr/lib/krb5" >> /etc/ld.so.conf /sbin/ldconfig fi postuninstall scriptlet (through 
/bin/sh): if [ $1 = 0 ] ; then TEMPFILE=`mktemp` if [ -n "$TEMPFILE" ] ; then /bin/fgrep -v /usr/lib
/krb5 /etc/ld.so.conf >> $TEMPFILE /bin/mv -f $TEMPFILE /etc/ld.so.conf /bin/chmod 655 /etc/ld.so.co
nf /bin/chown root:root /etc/ld.so.conf /sbin/ldconfig /bin/rm -f $TEMPFILE fi fi

Может библиотеки переместить в правильное место?

libqt3 :
postinstall scriptlet (through /bin/sh): /sbin/ldconfig rm -fr /tmp/.qt3 ||: rm -f /etc/.qt3/qt_plug
ins_3.*rc ||: [ -x /usr/bin/update-menus ] && /usr/bin/update-menus ||: # postuninstall scriptlet (t
hrough /bin/sh): /sbin/ldconfig [ "$1" = 0 -a -x /usr/bin/update-menus ] && /usr/bin/update-menus ||

Удалять в стандартных местах не стоит.

procps :
postinstall scriptlet (through /bin/sh): /sbin/ldconfig # remove obsolete files rm -f /etc/{psdevtab
,psdatabase} postuninstall program: /sbin/ldconfig

Наверное стоит переместить в trigger?

rp-pppoe-client :
preuninstall scriptlet (through /bin/sh): /sbin/chkconfig --del adsl #%files kmode-plugin #%config /
etc/modules.conf.pppoe #%dir /etc/ppp/plugins/ #/etc/ppp/plugins/rp-pppoe.so #%doc doc/KERNEL-MODE-P
PPOE

Явно не используется post/preun_service?

sleezeball :
postinstall scriptlet (through /bin/sh): if ! grep -qs '^internal-banner' /etc/squid/mime.conf; then
 echo 'internal-banner - banner.gif - image' >>/etc/squid/mime.conf fi cat >/etc/squid/sleezeball.co
 nf <<EOF # The SleezeBall Configuration # The URL to redirect banners to REDIRECT_URL=http://${HOSTN
 AME}:3128/squid-internal-static/icons/banner.gif # Uncomment this to enable log # LOG=/var/log/squid
 /sleezeball.log EOF
 slmdm_kernel-smp :
 
Зачем править чужие конфиги?

wwebalizer :
 preinstall scriptlet (through /bin/sh): /usr/sbin/groupadd -r -f webalizer 2>/dev/null ||: /usr/sbin
 /useradd -g webalizer -G apache -c 'The Webalizer' \ -d /var/lib/webalizer -s /dev/null -r webalizer
  2>/dev/null || : postinstall scriptlet (through /bin/sh): # get hostname to webalizer.conf W_HOST=`
  hostname` [ $? = 0 ] || W_HOST=localhost W_TMP=`mktemp -q webalizer.conf-XXXXXXXXXX` [ $? = 0 ] && s
  ed -e "s,__HOST__,$W_HOST,g" < /etc/webalizer.conf > $W_TMP && \ mv $W_TMP /etc/webalizer.conf && ch
  mod 644 /etc/webalizer.conf postuninstall scriptlet (through /bin/sh): /usr/sbin/userdel -r webalize
  r 2>/dev/null ||
  
Да и свои незачем ?

xemacs-auctex :
  postinstall scriptlet (through /bin/sh): LANGUAGE=POSIX; export LANGUAGE for f in auctex.info; do if
   [ "$f" = "${f##*/}" ]; then f="/usr/share/info/xemacs/$f" fi /sbin/install-info --section=XEmacs --
   dir-file="/usr/share/info/xemacs/dir" --info-file="$f" done preuninstall scriptlet (through /bin/sh)
   : LANGUAGE=POSIX; export LANGUAGE if [ $1 = 0 ]; then for f in auctex.info; do if [ "$f" = "${f##*/}
   " ]; then f="/usr/share/info/xemacs/$f" fi /sbin/install-info --section=XEmacs --delete --dir-file="
   /usr/share/info/xemacs/dir" --info-file="$f" done fi

Зачем LANGUAGE менять-то ?

zangband :
postinstall scriptlet (through /bin/sh): [ -x /usr/bin/update-menus ] && /usr/bin/update-menus ||: i
f [ -d /usr/games/lib/zangband//data ]; then rm -rf /usr/games/lib/zangband//data fi if [ -d /usr/ga
mes/lib/zangband//save ]; then for f in /usr/games/lib/zangband//save/*; do [ -e $f ] && install -m0
664 -g games -o games $f /var/lib/games/zangband//save/ done rm -rf /usr/games/lib/zangband//save fi
 preuninstall scriptlet (through /bin/sh): if [ -d /var/lib/games/zangband//data ]; then rm -rf /var
 /lib/games/zangband//data/* fi postuninstall scriptlet (through /bin/sh): [ "$1" = 0 -a -x /usr/bin/
 update-menus ] && /usr/bin/update-menus ||:

Наверное это излишне?

Наверное это перебор. Какой в этом глубокий смысл?

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

end of thread, other threads:[~2003-02-28 19:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 12:57 [devel] скрипты Stanislav Ievlev
2003-02-20 14:08 ` [devel] скрипты (LinPopUp) Grigory Batalov
2003-02-20 14:36 ` [devel] скрипты Alexander Bokovoy
2003-02-20 17:21 ` Alexey Voinov
2003-02-20 21:59 ` Andrey Orlov
2003-02-20 22:02   ` Dmitry V. Levin
2003-02-20 22:41     ` Andrey Orlov
2003-02-20 22:39       ` Dmitry V. Levin
2003-02-20 23:02         ` Andrey Orlov
2003-02-21  9:06       ` rider
2003-02-20 22:11 ` [devel] Re: скрипты (GNOME) Mikhail Zabaluev
2003-02-21  8:07   ` Stanislav Ievlev
2003-02-21 15:04     ` Mikhail Zabaluev
2003-02-25  8:30       ` Stanislav Ievlev
2003-02-20 22:39 ` [devel] Re: скрипты Michael Shigorin
2003-02-20 22:41   ` Dmitry V. Levin
2003-02-21  0:18     ` Michael Shigorin
2003-02-21  8:11   ` Stanislav Ievlev
2003-02-21 11:07     ` Michael Shigorin
2003-02-20 23:16 ` Mikhail Zabaluev
2003-02-28 19:24 ` [devel] скрипты Вячеслав Диконов

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git