mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-14 19:02:45 +03:00
Compare commits
3 Commits
4fc124d73a
...
730c658055
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
730c658055 | ||
| 3e886c87fb | |||
|
|
921c5cf1d3 |
58
docs/tiny-cloud.8.scd
Normal file
58
docs/tiny-cloud.8.scd
Normal file
@ -0,0 +1,58 @@
|
||||
TINY-CLOUD(1)
|
||||
|
||||
# NAME
|
||||
|
||||
tiny-cloud - perform critical initialization tasks for cloud instances
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
*tiny-cloud* [-h | --help] { boot | early | main | final | --bootstrap {complete|incomplete|status} | --enable | --disable }
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
*tiny-cloud* performs critical initialization tasks for cloud instaces during
|
||||
their first boot. *tiny-cloud* is designed to run in different stages during
|
||||
first boot.
|
||||
|
||||
# COMMANDS
|
||||
|
||||
*boot*
|
||||
Initiate the boot process of the cloud instance.
|
||||
|
||||
*early*
|
||||
Perform early-stage operations in the boot process.
|
||||
|
||||
*main*
|
||||
Execute main-stage operations during the boot process.
|
||||
|
||||
*final*
|
||||
Conduct final-stage operations, completing the boot process.
|
||||
|
||||
# OPTIONS
|
||||
|
||||
*-h, --help*
|
||||
Display help information.
|
||||
|
||||
*--bootstrap* {_complete|incomplete|status_}
|
||||
Manage the bootstrap state of the instance.
|
||||
|
||||
_complete_
|
||||
Mark the bootstrap process as complete.
|
||||
|
||||
_incomplete_
|
||||
Mark the bootstrap process as incomplete.
|
||||
|
||||
_status_
|
||||
Display the current status of the bootstrap process.
|
||||
|
||||
*--enable*
|
||||
Enable the cloud instance, allowing it to be managed or accessed.
|
||||
|
||||
*--disable*
|
||||
Disable the cloud instance, preventing it from being managed or accessed.
|
||||
|
||||
|
||||
# EXIT STATUS
|
||||
|
||||
*tiny-cloud* exists 0 on success and >0 on error.
|
||||
|
||||
@ -75,6 +75,7 @@ set_ssh_authorized_keys_for() {
|
||||
touch "$keys_file"
|
||||
chmod 600 "$keys_file"
|
||||
$MOCK chown -R "$user:$group" "$ssh_dir"
|
||||
local i
|
||||
for i in $sshkeys; do
|
||||
local key="$(get_userdata $userdata_path/$i)"
|
||||
if [ -n "$key" ]; then
|
||||
@ -142,7 +143,7 @@ write_file() {
|
||||
}
|
||||
|
||||
init__userdata_write_files() {
|
||||
local files="$(get_userdata write_files)"
|
||||
local i files="$(get_userdata write_files)"
|
||||
|
||||
for i in $files; do
|
||||
local path="$(get_userdata write_files/$i/path)"
|
||||
@ -204,7 +205,7 @@ init__userdata_package_upgrade() {
|
||||
|
||||
init__userdata_packages() {
|
||||
local packages="$(get_userdata packages)"
|
||||
local pkgs=
|
||||
local i pkgs=
|
||||
for i in $packages; do
|
||||
pkgs="$pkgs $(get_userdata packages/$i)"
|
||||
done
|
||||
@ -214,7 +215,7 @@ init__userdata_packages() {
|
||||
}
|
||||
|
||||
init__userdata_runcmd() {
|
||||
local runcmds="$(get_userdata runcmd)"
|
||||
local i runcmds="$(get_userdata runcmd)"
|
||||
for i in $runcmds; do
|
||||
local cmd="$(get_userdata runcmd/$i)"
|
||||
sh -c "$cmd"
|
||||
@ -222,7 +223,7 @@ init__userdata_runcmd() {
|
||||
}
|
||||
|
||||
init__userdata_groups() {
|
||||
local groups="$(get_userdata groups)"
|
||||
local i groups="$(get_userdata groups)"
|
||||
for i in $groups; do
|
||||
local group="$(get_userdata groups/$i)"
|
||||
$MOCK addgroup $group
|
||||
@ -241,7 +242,7 @@ in_list() {
|
||||
}
|
||||
|
||||
init__userdata_users() {
|
||||
local users="$(get_userdata users)"
|
||||
local i users="$(get_userdata users)"
|
||||
for i in $users; do
|
||||
local name="" gecos="" homedir="" shell="" primary_group="" groups=""
|
||||
local system=false no_create_home=false lock_passwd=true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user