geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

154 lines
4.6 KiB

  1. .\"
  2. .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  3. .\"
  4. .\" Copyright 2020 John-Mark Gurney
  5. .\"
  6. .\" Redistribution and use in source and binary forms, with or without
  7. .\" modification, are permitted provided that the following conditions
  8. .\" are met:
  9. .\" 1. Redistributions of source code must retain the above copyright
  10. .\" notice, this list of conditions and the following disclaimer.
  11. .\" 2. Redistributions in binary form must reproduce the above copyright
  12. .\" notice, this list of conditions and the following disclaimer in the
  13. .\" documentation and/or other materials provided with the distribution.
  14. .\"
  15. .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  16. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  18. .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  19. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  20. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  21. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  22. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  23. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  24. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  25. .\" SUCH DAMAGE.
  26. .\"
  27. .\" $FreeBSD$
  28. .\"
  29. .\" Note: The date here should be updated whenever a non-trivial
  30. .\" change is made to the manual page.
  31. .Dd October 25, 2020
  32. .Dt GGATESSH 7
  33. .Os
  34. .Sh NAME
  35. .Nm ggatessh
  36. .Nd start up script for ggatessh
  37. .Sh SYNOPSIS
  38. .Bd -literal -compact
  39. service ggatessh [one]start [ <devnum> ... ]
  40. service ggatessh [one]rescue [ <devnum> ... ]
  41. service ggatessh [one]stop [ <devnum> ... ]
  42. service ggatessh [one]destroy [ <devnum> ... ]
  43. service ggatessh [one]status [ <devnum> ... ]
  44. .Ed
  45. .Pp
  46. Configuration via
  47. .Xr rc.conf 5 :
  48. .Dl ggatessh_enable="YES"
  49. .Dl ggatessh_devs="<listofnums>"
  50. .Dl ggatessh_<num>_path="usera@hosta:patha/to/file"
  51. .Dl ggatessh_<num>_pidfile="/path/to/pidfile"
  52. .Dl ggatessh_<num>_sector="<size of sector>"
  53. .Dl ggatessh_<num>_port="<port of server>"
  54. .Dl ggatessh_<num>_sshkey="/path/to/ssh/key"
  55. .Sh DESCRIPTION
  56. The
  57. .Nm
  58. rc.d script is allows for boot time and run time configuration of
  59. .Xr ggatessh 8 .
  60. .Pp
  61. If no
  62. .Ar devnum
  63. arguments are specified, then the script iterates through all the
  64. numbers that are specified in the
  65. .Dv ggatessh_devs
  66. variable.
  67. If one or more
  68. .Ar devnum
  69. arguments are specified, the provided commands is run for each of them.
  70. .Pp
  71. The following actions are:
  72. .Bl -tag -width destroy
  73. .It start
  74. This creates the ggate device and runs the daemon with the specified
  75. parameters.
  76. .It rescue
  77. This requires that the ggate device has already been created w/ the
  78. .Cm start
  79. command or via another mechanism.
  80. This command will run
  81. .Xr ggatessh 8
  82. with the rescue command, allowing IOs to resume after a previous
  83. daemon has died.
  84. .It stop
  85. This command will kill the daemon that was started via the
  86. .Cm start
  87. command.
  88. This will not destroy the ggate device, which means that any IO to
  89. the device will hang and not be completed until the daemon is restarted
  90. or the device is forcefully destroyed using the
  91. .Xr ggatessh 8
  92. command.
  93. .It destroy
  94. This will destroy the ggate device.
  95. If the device is busy, or currently open, it will fail.
  96. .It status
  97. Print out the status of the
  98. .Xr ggatessh 8
  99. daemon, and if it is running, its pid.
  100. .El
  101. .Pp
  102. For each
  103. .Ar devnum
  104. specified, either via
  105. .Dv ggatessh_devs
  106. or as an argument, the following
  107. .Xr rc.conf 5
  108. options are used:
  109. .Bl -tag -width "ggatessh_<num>_pidfile"
  110. .It ggatessh_<num>_path
  111. This specifies the user, host and file to use.
  112. Its format is:
  113. .Dv [user@]host:file .
  114. If the user part is not specified, it defaults to
  115. .Dv root.
  116. .It ggatessh_<num>_pidfile
  117. Specify the file to use to store the daemon's pid.
  118. If this is not specified, it defaults to
  119. .Pa /var/run/ggatessh.ggate<num>.pid .
  120. .It ggatessh_<num>_sector
  121. Specifies the sector size of the device.
  122. If not specified, the default,
  123. .Dv 4096
  124. is used.
  125. .It ggatessh_<num>_port
  126. Specifies the port to connect to on the host.
  127. The default is 22 if not specified.
  128. .It ggatessh_<num>_sshkey
  129. Specifies the ssh key to use for authentication.
  130. If unspecified, the default
  131. .Pa $HOME/.ssh/id_rsa
  132. is used.
  133. As
  134. .Dv $HOME
  135. may be different when the startup script is run in different contexts,
  136. it is highly recommended to specify this.
  137. .El
  138. .Sh FILES
  139. .Bl -tag -width ".Pa /dev/null" -compact
  140. .It Pa /etc/rc.d/ggatessh
  141. The script described in this man page.
  142. .El
  143. .Sh SEE ALSO
  144. .Xr rc.conf 5 ,
  145. .Xr ggatessh 8
  146. .Sh HISTORY
  147. The
  148. .Nm
  149. script first appeared in
  150. .Fx 13.0 .
  151. .Sh AUTHORS
  152. This manual page was written by
  153. .An John-Mark Gurney Aq Mt jmg@FreeBSD.org .