View Pre/Post Install Script Under RPM Install
Here is some description that shows/display, what scripts run behind Installing a RPM
It also tells what Bash scripts runs.
Check This Out
It also tells what Bash scripts runs.
Check This Out
$ rpm -qp --scripts memcached-1.2.8-1.el5.x86_64.rpm
outputs:
preinstall scriptlet (using /bin/sh):
getent group memcached >/dev/null || groupadd -r memcached
getent passwd memcached >/dev/null || \
useradd -r -g memcached -d /var/run/memcached \
-s /sbin/nologin -c "Memcached daemon" memcached
exit 0
postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add memcached
preuninstall scriptlet (using /bin/sh):
if [ "$1" = 0 ] ; then
/sbin/service memcached stop > /dev/null 2>&1
/sbin/chkconfig --del memcached
fi
exit 0
postuninstall scriptlet (using /bin/sh):
if [ "$1" -ge 1 ]; then
/sbin/service memcached condrestart > /dev/null 2>&1
fi
exit 0
To view scripts for installed packages, enter:
rpm -q --scripts httpd
preinstall scriptlet (using /bin/sh):
getent group memcached >/dev/null || groupadd -r memcached
getent passwd memcached >/dev/null || \
useradd -r -g memcached -d /var/run/memcached \
-s /sbin/nologin -c "Memcached daemon" memcached
exit 0
postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add memcached
preuninstall scriptlet (using /bin/sh):
if [ "$1" = 0 ] ; then
/sbin/service memcached stop > /dev/null 2>&1
/sbin/chkconfig --del memcached
fi
exit 0
postuninstall scriptlet (using /bin/sh):
if [ "$1" -ge 1 ]; then
/sbin/service memcached condrestart > /dev/null 2>&1
fi
exit 0
[root@txvip1 tmp]# rpm -q --scripts httpd
preinstall scriptlet (using /bin/sh):
# Add the "apache" user
/usr/sbin/useradd -c "Apache" -u 48 \
-s /sbin/nologin -r -d /var/www apache 2> /dev/null || :
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
No comments:
Post a Comment