This file is indexed.

/usr/lib/neuron/bin/mos2nrn2.sh is in neuron-dev 7.5-1.

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
157
158
159
160
161
162
163
#!/bin/sh

# mos2nrn2 zipfile simdir running

ARCH=x86_64
MODSUBDIR=x86_64
if test "x${NRNHOME}" = x ; then
	prefix="/usr"
	exec_prefix="/usr/lib/neuron"
	NRNBIN="${exec_prefix}/bin/"
else
	prefix="$NRNHOME"
	exec_prefix="${prefix}/${ARCH}"
	NRNBIN="${exec_prefix}/bin/"
fi

if test "${NRNHOME_EXEC}" != "" ; then
	exec_prefix="${NRNHOME_EXEC}"
	NRNBIN="${exec_prefix}/bin/"
fi

if  [ "$3" = "1" ] ; then
	echo "Already running neuron controlled by mosaic.
Must quit that instance before running another."
	read a
	exit 0
fi

current=`pwd`

simdir=$2

askread="yes"

doclean() {
	if test "$a" = "y" ; then
		echo "removing $simdir"
		cd $simdir/..
		rm -r $simdir 
	else
		echo " not removing $simdir"
	fi      
	sleep 2
	exit 0
}

cleanup() {
	a=y
    if test "$askread" = "yes" ; then
	echo "Clean up by removing directory $simdir ? (n/y):$a"
	read a
    fi
	if test "$a" = "" ; then
		a=y
	fi
	doclean
}

asklaunch() {
	a=C
    if test "$askread" = "yes" ; then
	echo "[C]lean up by removing directory $simdir,
[R]elaunch NEURON,
or immediately e[X]it ? (C/R/X):$a"
	read a
    fi
	case "$a" in
	R|r) a=R;;
	X|x) a=n;;
	*) a=y;;
	esac
}

if test -f $simdir ; then
	rm -f $simdir # maybe mkstemp was used and the file was created.
fi

if  mkdir $simdir ; then
	true
else
	echo "Couldn't mkdir $simdir"
	read a
	exit 0
fi
	
# make a file for communication with neuron

cp $1 $simdir/nrnzip.zip
echo "Changing the current directory to $simdir"
cd $simdir

unzip -n nrnzip.zip

for MOSINIT in mosinit.py mosinit.hoc ; do
  if [ -r $MOSINIT ] ; then
	first=./$MOSINIT
  else
	first=`find . -name $MOSINIT -print |sed -n 1p`
  fi
  if [ "$first" ] ; then
    break
  fi
done

if [ -z "$first" ] ; then
	echo "Missing the mosinit.hoc or mosinit.py file"
	cleanup
fi
cd `dirname $first`
first=`basename $first`

if [ -f moslocal.tmp ] ; then
	askread="no"
fi

if [ "$MOSINIT" = "mosinit.hoc" ] ; then
  moddirs="`sed -n '1s;^//moddir;;p' < $first | tr -d '\r'`"
  MOSINITARGS="$first -"
else
  moddirs="`sed -n '1s;^#moddir;;p' < $first | tr -d '\r'`"
  MOSINITARGS="-python $first"
fi

if test "$moddirs" != "" ; then
	modfiles='yes'
else
	modfiles="`ls *.mod 2>/dev/null`"
fi

if [ "$modfiles" ] ; then
	# run special
	a=y
    if test "$askread" = "yes" ; then
	echo "Create the special version and run it? (y/n):"
	read a
    fi
	if [ "$a" != "y" -a "$a" != "" ] ; then
		cleanup
	fi
	"${NRNBIN}nrnivmodl" $moddirs
	a=R
	while test "$a" = "R" ; do
		./${MODSUBDIR}/special $MOSINITARGS
		asklaunch
	done
else
	# run neuron
	a=y
    if test "$askread" = "yes" ; then
	echo "Run NEURON? (y/n):"
	read a
    fi
	if [ "$a" != "y" -a "$a" != "" ] ; then
		cleanup
	fi
	a=R
	while test "$a" = "R" ; do
		"${NRNBIN}nrniv" $MOSINITARGS
		asklaunch
	done
fi

doclean