19 lines
425 B
Bash
19 lines
425 B
Bash
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
# These are expected to happen
|
|
ERR_GEN = 1 # General error
|
|
ERR_NET = 2 # Network link error
|
|
ERR_DNS = 3 # DNS error or resolution failure
|
|
ERR_SSL = 4 # HTTPS failure
|
|
ERR_SIG = 5 # Update file fails signature
|
|
|
|
# These should probably never happen
|
|
ERR_PRM = 6 # Insufficient permission
|
|
ERR_BLK = 7 # Block device or partition error
|
|
ERR_MNT = 8 # Mounting failure
|
|
|
|
err_exit() {
|
|
>&2 echo $2
|
|
} |