Major overhaul -- most scripts rewritten or updated.
[pkgusr] / usr / lib / pkgusr / ldconfig
1 #!/bin/bash
2 # Copyright (C) 2014 Steve Youngs <steve@steveyoungs.com>
3 ####
4 #
5 #  Call ldconfig with sudo to avoid errors and warnings about not
6 #  having permission to change /etc/ld.so.cache
7 #
8 ####
9
10 if [ -x $(type -p sudo) ]; then
11     sudo /sbin/ldconfig "$@"
12 else
13     /sbin/ldconfig "$@" || exit $?
14     echo 1>&2 '***' No sudo available, you need to run ldconfig as root
15 fi
16
17 exit 0
18
19
20 # Local variables:
21 # sh-basic-offset: 4
22 # End: