This file is indexed.

/usr/sbin/condor_init is in htcondor 8.6.8~dfsg.1-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/bin/sh

##**************************************************************
##
## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
## University of Wisconsin-Madison, WI.
## 
## Licensed under the Apache License, Version 2.0 (the "License"); you
## may not use this file except in compliance with the License.  You may
## obtain a copy of the License at
## 
##    http://www.apache.org/licenses/LICENSE-2.0
## 
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
##**************************************************************



#
#  This is the condor_init script.  It creates all the necessary
#  files and directories on a host to run Condor.  
# 

# Where can I find the condor_config_val binary?
CONFIG_VAL_PATH="condor_config_val"

# Create soft link, as needed, to find the global config file.

# Be sure to get just the hostname without domain name.
HOSTNAME=`hostname | sed "s/\..*//g"`

# Find out who should own the Condor files.
OWNER=`$CONFIG_VAL_PATH -owner 2> /dev/null`
if [ ! -n "$OWNER" ]; then
   echo 'Error determining who should own the Condor-related directories.'
   echo 'Either create a "condor" account, or set the CONDOR_IDS environment'
   echo 'variable to the valid uid.gid pair that should be used by Condor.'
   exit 1
fi

# We need the -h option so we don't get an error if the local config
# file doesn't exist.
CONFIG_VAL="$CONFIG_VAL_PATH -h $HOSTNAME"

CONDOR_LOCALDIR=`$CONFIG_VAL LOCAL_DIR 2> /dev/null`
CONDOR_LOG=`$CONFIG_VAL LOG 2> /dev/null`
CONDOR_SPOOL=`$CONFIG_VAL SPOOL 2> /dev/null`
CONDOR_EXECUTE=`$CONFIG_VAL EXECUTE 2> /dev/null`
CONDOR_LOCALCFG=`$CONFIG_VAL LOCAL_CONFIG_FILE 2> /dev/null`
CONDOR_LOCK=`$CONFIG_VAL LOCK 2> /dev/null`

# Create a soft link to the global config file.

if [ -n "$CONDOR_LOCALDIR" ]; then
	if [ ! -d $CONDOR_LOCALDIR ]; then
		echo "Creating $CONDOR_LOCALDIR"
		mkdir $CONDOR_LOCALDIR
		chmod 755 $CONDOR_LOCALDIR
		chown $OWNER $CONDOR_LOCALDIR
	fi
else
	echo "LOCAL_DIR is not defined, will not create"
fi

if [ -n "$CONDOR_LOG" ]; then
	if [ ! -d $CONDOR_LOG ]; then
		echo "Creating $CONDOR_LOG"
		mkdir $CONDOR_LOG 2> /dev/null
		if [ ! -d $CONDOR_LOG ]; then
			echo "Error creating $CONDOR_LOG"
			exit 1
		fi
		chmod 755 $CONDOR_LOG
		chown $OWNER $CONDOR_LOG
	else
		echo "$CONDOR_LOG already exists."
	fi
else
	echo "LOG is not defined here, fix this and try again."
	exit 1
fi

if [ -n "$CONDOR_SPOOL" ]; then

	CONDOR_SPOOL_PARENT=`echo $CONDOR_SPOOL | sed "s/\/[a-zA-Z]*$//g"`

	if [ ! -d $CONDOR_SPOOL_PARENT ]; then
		echo "Creating $CONDOR_SPOOL_PARENT"
		mkdir $CONDOR_SPOOL_PARENT
		chmod 755 $CONDOR_SPOOL_PARENT
	fi

	if [ ! -d $CONDOR_SPOOL ]; then
		echo "Creating $CONDOR_SPOOL"
		mkdir $CONDOR_SPOOL
		chmod 755 $CONDOR_SPOOL
		chown $OWNER $CONDOR_SPOOL
	else
		echo "$CONDOR_SPOOL already exists."
	fi
else
	echo "SPOOL is not defined, will not create."
fi

if [ -n "$CONDOR_EXECUTE" ]; then

	CONDOR_EXECUTE_PARENT=`echo $CONDOR_EXECUTE | sed "s/\/[a-zA-Z]*$//g"`

	if [ ! -d $CONDOR_EXECUTE_PARENT ]; then
		echo "Creating $CONDOR_EXECUTE_PARENT"
		mkdir $CONDOR_EXECUTE_PARENT
		chmod 755 $CONDOR_EXECUTE_PARENT
	fi

	if [ ! -d $CONDOR_EXECUTE ]; then
		echo "Creating $CONDOR_EXECUTE"
		mkdir $CONDOR_EXECUTE
		chmod 755 $CONDOR_EXECUTE
		chown $OWNER $CONDOR_EXECUTE
	else
		echo "$CONDOR_EXECUTE already exists."
	fi
else
	echo "EXECUTE is not defined, will not create."
fi

if [ -n "$CONDOR_LOCALCFG" ]; then
	if [ ! -f $CONDOR_LOCALCFG ]; then
		echo "Creating $CONDOR_LOCALCFG"
		touch $CONDOR_LOCALCFG 
		chmod 644 $CONDOR_LOCALCFG
	else 
		echo "$CONDOR_LOCALCFG already exists."
	fi
else
	echo "LOCAL_CONFIG_FILE is not defined, will not create."
fi

if [ -n "$CONDOR_LOCK" ]; then
	if [ ! -d $CONDOR_LOCK -a "$CONDOR_LOCK" != "$CONDOR_LOG" ];
	then
		echo "Creating $CONDOR_LOCK"
		mkdir $CONDOR_LOCK
		chmod 755 $CONDOR_LOCK
		chown $OWNER $CONDOR_LOCK
	fi
else
	echo "LOCK is not defined, will not create."
fi

echo "Condor has been initialized, but not started."