Skip to content

Commit

Permalink
pinetainer: rootfs-overlay: better error handling for init.d scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTMjugador committed Sep 12, 2020
1 parent 3965139 commit d91a386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions board/pinetainer/rootfs-overlay/etc/init.d/S00cgroups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ start() {
echo 'OK'
else
echo 'FAIL'
return 1
fi
}

Expand Down Expand Up @@ -92,6 +93,7 @@ stop() {
echo 'OK'
else
echo 'FAIL'
return 1
fi
}

Expand Down
7 changes: 5 additions & 2 deletions board/pinetainer/rootfs-overlay/etc/init.d/S11hostapd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ start() {
-- -B -P /run/hostapd.pid /etc/hostapd.conf; then
echo 'OK'
else
exit_code=$?
echo 'FAIL'
return $exit_code
fi
}

Expand All @@ -17,13 +19,14 @@ stop() {
if start-stop-daemon -p /run/hostapd.pid -x /usr/sbin/hostapd -o -q -K; then
echo 'OK'
else
exit_code=$?
echo 'FAIL'
return $exit_code
fi
}

restart() {
stop
start
stop && start
}

case "$1" in
Expand Down

0 comments on commit d91a386

Please sign in to comment.