Files
sailing-analytics/configuration/archive_instance_setup/mountnvmeswap.initd
T
2024-01-11 09:07:29 +00:00

42 lines
869 B
Bash
Executable File

#!/bin/bash
#
# mountnvmeswap Formats and mounts a yet unpartitioned NVMe volume as swap
#
# chkconfig: 2345 95 10
# description: Formats and mounts a yet unpartitioned NVMe volume as swap
#
### BEGIN INIT INFO
# Provides: mountnvmeswap
# Required-Start: $local_fs $network
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Formats and mounts a yet unpartitioned NVMe volume as swap
# Description: Formats and mounts a yet unpartitioned NVMe volume as swap
### END INIT INFO
# Source function library.
. /etc/init.d/functions
RETVAL=0
# See how we were called.
case "$1" in
start)
/usr/local/bin/mountnvmeswap
;;
stop)
;;
status)
swapon -s | grep /dev/nvme0n1
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|status|stop}"
RETVAL=3
esac
exit $RETVAL