diff --git a/contrib/start-scripts/linux b/contrib/start-scripts/linux
index b950cf5..95a18e0 100644
--- a/contrib/start-scripts/linux
+++ b/contrib/start-scripts/linux
@@ -65,6 +65,10 @@ DAEMON="$prefix/bin/postmaster"
 # What to use to shut down the postmaster
 PGCTL="$prefix/bin/pg_ctl"
 
+# OOM killer control files
+PG_FILE_OOM_SCORE_ADJ="/proc/self/oom_score_adj"
+PG_FILE_OOM_ADJ="/proc/self/oom_adj"
+
 set -e
 
 # Only start if we can find the postmaster.
@@ -82,8 +86,12 @@ test -x $DAEMON ||
 case $1 in
   start)
 	echo -n "Starting PostgreSQL: "
-	test x"$OOM_SCORE_ADJ" != x && echo "$OOM_SCORE_ADJ" > /proc/self/oom_score_adj
-	test x"$OOM_ADJ" != x && echo "$OOM_ADJ" > /proc/self/oom_adj
+	test -e "$PG_FILE_OOM_SCORE_ADJ" && \
+		test x"$OOM_SCORE_ADJ" != x && \
+		echo "$OOM_SCORE_ADJ" > $PG_FILE_OOM_SCORE_ADJ
+	test -e "$PG_FILE_OOM_ADJ" && \
+		test x"$OOM_ADJ" != x && \
+		echo "$OOM_ADJ" > $PG_FILE_OOM_ADJ
 	su - $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
 	echo "ok"
 	;;
@@ -95,8 +103,12 @@ case $1 in
   restart)
 	echo -n "Restarting PostgreSQL: "
 	su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -w"
-	test x"$OOM_SCORE_ADJ" != x && echo "$OOM_SCORE_ADJ" > /proc/self/oom_score_adj
-	test x"$OOM_ADJ" != x && echo "$OOM_ADJ" > /proc/self/oom_adj
+	test -e "$PG_FILE_OOM_SCORE_ADJ" && \
+		test x"$OOM_SCORE_ADJ" != x && \
+		echo "$OOM_SCORE_ADJ" > $PG_FILE_OOM_SCORE_ADJ
+	test -e "$PG_FILE_OOM_ADJ" && \
+		test x"$OOM_ADJ" != x && \
+		echo "$OOM_ADJ" > $PG_FILE_OOM_ADJ
 	su - $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
 	echo "ok"
 	;;
