File: python-rtslib-fb.postinst

package info (click to toggle)
python-rtslib-fb 2.1.57%2Bdebian-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 376 kB
  • ctags: 521
  • sloc: python: 3,307; makefile: 172; sh: 132
file content (20 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

if [ "$1" = "configure" ] ; then
	update-alternatives --install /usr/bin/targetctl targetctl /usr/bin/targetctl-python2 300
	if [ ! -d /etc/rtslib-fb-target ] ; then
		mkdir -p /etc/rtslib-fb-target
	fi
	# If file doesn't exist or is of size zero, write it...
	if [ ! -s /etc/rtslib-fb-target/saveconfig.json ] ; then
		echo "{
  \"fabric_modules\": [],
  \"storage_objects\": [],
  \"targets\": []
}" >/etc/rtslib-fb-target/saveconfig.json
	fi
fi

#DEBHELPER#