Add a swap file to build machines
[releng/builder.git] / jenkins-scripts / jenkins-init-script.sh
index fe327e3f544fbcfe28e9bcefcde7364521a3dd50..3309b00ab11322912a3e9d0c924f74ef84091f44 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+# SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2016 The Linux Foundation and others.
 #
@@ -24,3 +24,9 @@ source /tmp/system_type.sh
 
 ## add local environment changes post scripts
 ./jenkins-init-script-local-env.sh
+
+# Create a swap file
+dd if=/dev/zero of=/swap count=1024 bs=1MiB
+chmod 600 /swap
+mkswap /swap
+swapon /swap