Add jenkins-init-scripts to global-jjb
[releng/global-jjb.git] / jenkins-init-scripts / create-swap-file.sh
diff --git a/jenkins-init-scripts/create-swap-file.sh b/jenkins-init-scripts/create-swap-file.sh
new file mode 100755 (executable)
index 0000000..cf8d97f
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2018 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+dd if=/dev/zero of=/swap count=1024 bs=1MiB
+chmod 600 /swap
+mkswap /swap
+swapon /swap