rpm내부 스크립트 보기

Jmnote (토론 | 기여)님의 2014년 3월 17일 (월) 22:39 판 (새 문서: {{소문자}} ;rpm 패키지 내 스크립트 보기 ;rpm 내부 스크립트 확인 ;rpm이 포함하고 있는 스크립트 보기 ==명령어== ;설치된 패키지 <source lang='...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

rpm 패키지 내 스크립트 보기
rpm 내부 스크립트 확인
rpm이 포함하고 있는 스크립트 보기

1 명령어

설치된 패키지
rpm -q --scripts 패키지명
rpm 파일
rpm -qp --scripts 알피엠파일.rpm

2 실행예시 1: 설치된 패키지

[root@jmnote ~]# rpm -qa httpd
httpd-2.2.15-15.el6.centos.1.x86_64
[root@jmnote ~]# rpm -q --scripts httpd
preinstall scriptlet (using /bin/sh):
# Add the "apache" user
getent group apache >/dev/null || groupadd -g 48 -r apache
getent passwd apache >/dev/null || \
  useradd -r -u 48 -g apache -s /sbin/nologin \
    -d /var/www -c "Apache" apache
exit 0
postinstall scriptlet (using /bin/sh):
# Register the httpd service
/sbin/chkconfig --add httpd
preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ]; then
	/sbin/service httpd stop > /dev/null 2>&1
	/sbin/chkconfig --del httpd
fi
posttrans scriptlet (using /bin/sh):
/sbin/service httpd condrestart >/dev/null 2>&1 || :

3 실행예시 2: rpm 파일

[root@jmnote ~]# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
... (생략)
Saving to: “epel-release-6-8.noarch.rpm”

100%[=================================================>] 14,540      60.8K/s   in 0.2s    

2014-03-17 22:27:53 (60.8 KB/s) - “epel-release-6-8.noarch.rpm” saved [14540/14540]
[root@jmnote ~]# rpm -qp --scripts epel-release-6-8.noarch.rpm
postinstall scriptlet (using /bin/sh):
# Not needed for el6 as sources has been removed
#echo "# epel repo -- added by epel-release " \
#    >> /etc/sysconfig/rhn/sources
#echo "yum epel http://download.fedora.redhat.com/pub/epel/6/\$ARCH" \
#    >> /etc/sysconfig/rhn/sources
postuninstall scriptlet (using /bin/sh):
#sed -i '/^yum\ epel/d' /etc/sysconfig/rhn/sources
#sed -i '/^\#\ epel\ repo\ /d' /etc/sysconfig/rhn/sources

4 같이 보기

5 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}