Files
ssm-services/services/fsck
T

20 lines
312 B
Plaintext
Raw Normal View History

2017-07-13 16:09:42 +03:00
#!/usr/bin/env ssm
2013-09-29 03:32:39 +04:00
service_type='oneshot'
2017-07-13 16:09:42 +03:00
service_command=( /usr/bin/fsck -A -C -p )
2013-09-29 03:32:39 +04:00
2017-07-13 16:09:42 +03:00
pre_start() {
printf 'Remounting / as read-only...\n'
2013-09-29 03:32:39 +04:00
mount / -o remount,ro
2017-07-13 16:09:42 +03:00
}
2013-09-29 03:32:39 +04:00
2017-07-13 16:09:42 +03:00
start() {
printf 'Checking filesystems...\n'
super_start
}
2013-09-29 03:32:39 +04:00
2017-07-13 16:09:42 +03:00
post_start() {
printf 'Remounting / as read-write...\n'
2013-09-29 03:32:39 +04:00
mount / -o remount,rw
}