File: rpm-ostree-fix

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (37 lines) | stat: -rwxr-xr-x 942 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#
# Perform post-install steps for RPM packages installed
# on rpm-ostree installations.  This is usually done by
# %post sections in the PCP spec file but on rpm-ostree
# installs /var may not persist.
#

. /etc/pcp.env

if [ `id -u` != 0 ]
then
    echo >&2 "Error: this script must run as root"
elif [ ! -w "$PCP_VAR_DIR" ]
then
    echo >&2 "Error: $PCP_VAR_DIR is not writable"
else
    echo "Setting up PCP selinux policy ..."
    $PCP_BINADM_DIR/selinux-setup $PCP_VAR_DIR/selinux install pcpupstream

    echo "Preparing for service restart ..."
    touch $PCP_LOG_DIR/pmlogger/.NeedRewrite
    touch $PCP_PMNS_DIR/.NeedRebuild

    if [ -d $PCP_SHARE_DIR/zeroconf ]
    then
	echo "Enabling zeroconf metrics ..."
	for PMDA in dm nfsclient openmetrics
	do
	    touch $PCP_PMDAS_DIR/$PMDA/.NeedInstall
	done
    fi

    echo "Restarting services ..."
    systemctl restart pmcd pmlogger
    echo "Done.  Have a nice day!"
fi