-
Notifications
You must be signed in to change notification settings - Fork 27
Conversation
@@ -117,7 +117,7 @@ main() { | |||
} | |||
|
|||
log "Mounting all local filesystems..."; { | |||
mount -at nosysfs,nonfs,nonfs4,nosmbfs,nocifs -O no_netdev || | |||
mount -a || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message above should be changed to Mounting all filesystems...
as the removal of these flags will cause mount
to attempt to mount network partitions. I've never actually seen this use-case so we should be fine here.
@@ -16,20 +16,18 @@ main() { | |||
dd count=1 bs=512 if=/dev/random of=/var/random.seed | |||
} | |||
|
|||
halt -w |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
halt
tells the system to cease all CPU activity though I'm unsure if it is needed as we send TERM
regardless. I'm also fine with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ubase halt only has -p and -r switches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine to remove regardless as we only used halt
to write the wtmp
record.
-> halt --help
BusyBox v1.31.1 (2019-10-25 20:52:45 EEST) multi-call binary.
Usage: halt [-d DELAY] [-n] [-f] [-w]
Halt the system
-d SEC Delay interval
-n Do not sync
-f Force (don't go through init)
-w Only write a wtmp record
We really "halt" the machine ourselves below.
} | ||
|
||
log "Unmounting filesystems and disabling swap..."; { | ||
swapoff -a | ||
umount -rat nosysfs,noproc,nodevtmpfs,notmpfs | ||
umount -a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine.
lib/init/rc.shutdown
Outdated
killall5 TERM | ||
sleep 1 | ||
} | ||
|
||
log "Sending KILL signal to all processes..."; { | ||
killall5 -KILL | ||
killall5 KILL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does killall5
work without -
in busybox
as well. Might need to investigate here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. I'm a little busy atm.
Here is what I had to do to make ubase compatible busybox. If we are interested in being able to swap ubase/sbase/etc. for busybox some day, this is how I did in our init scripts.
Note: I'm not saying ubase is the be all end all or that is should have the last say about anything.
Not sure if this should be merged or not. But init works for me when using these changes.