File: and-find-init.d

package info (click to toggle)
and 1.2.2-4.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 352 kB
  • ctags: 296
  • sloc: ansic: 1,198; sh: 253; makefile: 164
file content (28 lines) | stat: -rwxr-xr-x 400 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
#
# Figure out where SysV init.d directory is. On BSD, return /tmp.
#
# 2001, Patrick Schemitz <schemitz@users.sourceforge.net>
#

# SuSE 7, Debian
if [ -d /etc/init.d ]; then
	echo /etc/init.d
	exit 0
fi

# SuSE 6, OSF/1
if [ -d /sbin/init.d ]; then
	echo /sbin/init.d
	exit 0
fi

# Redhat 7
if [ -d /etc/rc.d/init.d ]; then
	echo /etc/rc.d/init.d
	exit 0
fi

# Huh? BSD?
echo /tmp
exit 1