This commit is contained in:
wt committed 2024-09-12 15:12:32 +07:00
1 parent 1a6972ea2e
commit 8646e4ddd1
5 files changed
+17 -7

No files matched your search

+2 -2
View File
@@ -36,9 +36,9 @@ rc() {
#---------- check status function -----------
check() {
if [ $1 -ne 0 ]; then
printf "$URED** ERROR: $2\n$RESET"
printf "$BBLUE**$BRED ERROR: $2\n$RESET"
return
fi
printf "$UGREEN** SUCCESS: $2\n$RESET"
printf "$BBLUE**$BGREEN SUCCESS: $2\n$RESET"
}
#--------------------------------------------
+1 -1
View File
@@ -5,7 +5,7 @@
case "$1" in
start)
printf "$UYELLOW** Setting up hostname\n$RESET"
printf "$BBLUE**$BYELLOW Setting up hostname\n$RESET"
/bin/hostname -F /etc/hostname
check $? "Set up hostname"
;;
+2 -2
View File
@@ -5,13 +5,13 @@
case "$1" in
start)
printf "$UYELLOW** Starting networking\n$RESET"
printf "$BBLUE**$BYELLOW Starting networking\n$RESET"
/sbin/ifup -a &> /dev/null
check $? "networking"
echo $! > /var/run/networking.pid
;;
stop)
printf "$UYELLOW Stopping netowrking\n$RESET"
printf "$BBLUE**$BYELLOW Stopping netowrking\n$RESET"
/sbin/ifdown -a
check $? "Stop networking"
if [ -f /var/run/networking.pid ]; then
+2 -2
View File
@@ -5,13 +5,13 @@
case "$1" in
start)
printf "$UYELLOW** Mounting virtual filesystems\n$RESET"
printf "$BBLUE**$BYELLOW Mounting virtual filesystems\n$RESET"
mount -t tmpfs tmpfs /var/run
check $? "Mount virtual filesystems"
echo $! > /var/run/networking.pid
;;
stop)
printf "$UYELLOW Umounting virtual filesystems\n$RESET"
printf "$BBLUE**$BYELLOW Umounting virtual filesystems\n$RESET"
umount /var/run
check $? "Umount virtual filesystems"
rm /var/run/networking.pid