File: post_setup_forbid_home

package info (click to toggle)
piuparts 0.62
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,692 kB
  • sloc: python: 6,823; sh: 2,194; makefile: 126
file content (22 lines) | stat: -rwxr-xr-x 362 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e

case ${PIUPARTS_OBJECTS%%=*} in
	dpkg)
		# skip while creating the tarball
		exit 0
		;;
esac

case $PIUPARTS_DISTRIBUTION in
	lenny|squeeze|squeeze-proposed)
		exit 0
		;;
esac

if [ -d /home ]; then
	echo "Disabling /home"
	mv /home /home.orig
	echo "This is a dummy file to prevent creating directories in /home" > /home
	chmod 000 /home
fi