Skip to content

Commit 0dd8239

Browse files
committed
fix: replace - with _ in api functions
1 parent 1eb0622 commit 0dd8239

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎system/cuos/api.sh‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ api_command_pull() {
137137
return 1
138138
}
139139

140-
api_command_trigger-update() {
140+
api_command_trigger_update() {
141141
docker exec cuos-app /api/cuos-trigger-update
142142
R="$?"
143143
# if Container not started or API it not defined, perform cuos update
@@ -178,7 +178,7 @@ api_command_patch() {
178178
}
179179

180180
## patch-network - Patch the network. Provide config object.
181-
api_command_patch-network_func() {
181+
api_command_patch_network_func() {
182182
local input
183183
input="$(cat)"
184184

@@ -197,13 +197,13 @@ api_command_patch-network_func() {
197197
"${SCRIPT_DIR}/init.sh" --reinit configure_network
198198
fi
199199
}
200-
api_command_patch-network() {
201-
api_command_patch-network_func >&2
200+
api_command_patch_network() {
201+
api_command_patch_network_func >&2
202202
api_handle_code "$?"
203203
}
204204

205205
## patch-hostname - Patch the hostname. Provide config object.
206-
api_command_patch-hostname_func() {
206+
api_command_patch_hostname_func() {
207207
local input
208208
input="$(cat)"
209209

@@ -219,8 +219,8 @@ api_command_patch-hostname_func() {
219219
"${SCRIPT_DIR}/init.sh" --reinit set_hostname
220220
fi
221221
}
222-
api_command_patch-hostname() {
223-
api_command_patch-hostname_func >&2
222+
api_command_patch_hostname() {
223+
api_command_patch_hostname_func >&2
224224
api_handle_code "$?"
225225
}
226226

@@ -231,7 +231,7 @@ api_command_rollback() {
231231
}
232232

233233
## factory-reset - Factory reset
234-
api_command_factory-reset() {
234+
api_command_factory_reset() {
235235
report_notice "cuos:useraction:factory-reset" "Factory reset triggered by the user"
236236
setsid "${SCRIPT_DIR}/do-factory-reset.sh" >/data/log/factory-reset.log 2>&1 &
237237
tail -f /data/log/factory-reset.log

‎system/cuos/app-init.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,6 @@ fi
191191

192192
state '.state' 'running'
193193

194-
report_info "cuos:startup:ready" "Operation system ready. Starting applications ..."
194+
report_info "cuos:startup:ready" "Operating system ready. Starting applications ..."
195195

196196
sleep infinity & wait

‎updater/perform_update.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ filename_initrd="${SLOT}_$(basename "${initrd}")"
111111
if [[ "${OS_ARCH}" == "rpi"* ]]; then
112112
rm -Rf "${TARGET_BOOT}/firmware_prev" || true
113113
mkdir -p "${TARGET_BOOT}/firmware_prev" || true
114-
mv "${TARGET_BOOT}"/{bcm27*.dtb,bootcode.bin,fixup*.dat,LICENCE.broadcom,config.txt,initramfs*,kernel*.img,overlays,start*.elf} "${TARGET_BOOT}/firmware_prev/" || true
114+
mv "${TARGET_BOOT}"/{bcm27*.dtb,bootcode.bin,fixup*.dat,LICENCE.broadcom,config.txt,initramfs*,kernel*.img,overlays,start*.elf} "${TARGET_BOOT}/firmware_prev/" 2>/dev/null || true
115115
docker cp "${CONTAINER_NAME}:/boot/firmware/." "${TARGET_BOOT}" \
116116
|| raise 112 "Failed to copy kernel"
117117

@@ -197,7 +197,7 @@ version="$(basename "${kernel}" | sed 's/vmlinuz-//')"
197197

198198
if [[ "${OS_ARCH}" == "rpi"* ]]; then
199199

200-
mv "${TARGET_BOOT}"/cmdline.txt "${TARGET_BOOT}"/cmdline-previous.txt
200+
mv "${TARGET_BOOT}"/cmdline.txt "${TARGET_BOOT}"/cmdline-previous.txt 2>/dev/null || true
201201

202202
cat <<EOF > "${TARGET_BOOT}/cmdline.txt"
203203
console=serial0,115200 console=tty1 rootwait root=LABEL=system rootfstype=btrfs rootflags=subvol=${CONTAINER_ROOTFS} fsck.repair=yes ro loglevel=3 noresume apparmor=0

0 commit comments

Comments
 (0)