- rpm 패키지 내 스크립트 보기
- rpm 내부 스크립트 확인
- rpm이 포함하고 있는 스크립트 보기
1 명령어[ | ]
- 설치된 패키지
Bash
Copy
rpm -q --scripts 패키지명
- rpm 파일
Bash
Copy
rpm -qp --scripts 파일명.rpm
2 실행예시 1: 설치된 패키지[ | ]
Console
Copy
[root@zetawiki ~]# rpm -qa httpd
httpd-2.2.15-15.el6.centos.1.x86_64
Console
Copy
[root@zetawiki ~]# 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 파일[ | ]
Console
Copy
[root@zetawiki ~]# ll | grep epel-release
-rw-r--r--. 1 root root 14540 Nov 6 2012 epel-release-6-8.noarch.rpm
Console
Copy
[root@zetawiki ~]# 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 같이 보기[ | ]
- rpm 내부 파일목록 보기
- rpm 내부 문서파일 목록 보기
- rpm 내부 설정파일 목록 보기
- rpm 내부 스크립트 보기
- rpm으로 파일이 속한 패키지 찾기
- rpm 정보 보기
- rpm 사용법
- jar 내부 파일 목록 보기
5 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.