File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 15
15
#
16
16
#
17
17
18
+ _set_localbase () {
19
+ _localbase=` /sbin/sysctl -n user.localbase 2> /dev/null`
20
+ # Set default value of _localbase if not previously set
21
+ : ${_localbase:= " /usr/local" }
22
+ }
23
+
24
+ # Set _localbase with fallback to /usr/local
25
+ _set_localbase
26
+
18
27
# What files override these defaults ?
19
28
periodic_conf_files=" /etc/periodic.conf /etc/periodic.conf.local ${_localbase} /etc/periodic.conf"
20
29
Original file line number Diff line number Diff line change @@ -29,21 +29,17 @@ if [ $# -lt 1 ] ; then
29
29
usage
30
30
fi
31
31
32
- _localbase=` /sbin/sysctl -n user.localbase 2> /dev/null`
33
- # Set default value of _localbase if not previously set
34
- : ${_localbase:= " /usr/local" }
35
-
36
- # Use a deterministic path to match the preset from /etc/crontab in case
37
- # periodic is run interactively.
38
- export PATH=/sbin:/bin:/usr/sbin:/usr/bin:${_localbase} /sbin:${_localbase} /bin
39
-
40
32
# If possible, check the global system configuration file,
41
33
# to see if there are additional dirs to check
42
34
if [ -r /etc/defaults/periodic.conf ]; then
43
35
. /etc/defaults/periodic.conf
44
36
source_periodic_confs
45
37
fi
46
38
39
+ # Use a deterministic path to match the preset from /etc/crontab in case
40
+ # periodic is run interactively.
41
+ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:${_localbase} /sbin:${_localbase} /bin
42
+
47
43
host=` hostname`
48
44
export host
49
45
You can’t perform that action at this time.
0 commit comments