4 Commits

Author SHA1 Message Date
0cb5c0e5d6 Use a faster command 2019-03-09 20:07:37 +07:00
32cf88bd2b Add CLEANTMP option 2019-03-08 20:11:10 +07:00
a6df81b8fb Remove rc script for netfs
Since network services are started on stage 2, I'm going to delete this.
A replacement runit service will be added in the future.
2019-02-12 21:20:53 +07:00
1df9ca6564 Do not check for mounted fs 2019-02-12 21:19:44 +07:00
5 changed files with 6 additions and 36 deletions

View File

@@ -28,7 +28,6 @@ RCSVD = \
sv.d/misc \
sv.d/mount-all \
sv.d/net-lo \
sv.d/netfs \
sv.d/random-seed \
sv.d/remount-root \
sv.d/swap \

View File

@@ -26,3 +26,7 @@
# /sys/fs/cgroup in hybrid or legacy mode
# HAVE_CONTROLLER1_GROUPS="true"
# Set to 'yes' to remove all files from /tmp
# CLEANTMP="no"

View File

@@ -13,6 +13,7 @@ cleaning(){
fi
rm -f /etc/nologin /forcefsck /forcequotacheck /fastboot
[ "$CLEANTMP" == "yes" ] && find /tmp -maxdepth 1 -name '[!ajlq\.]*' -exec rm -rf -- {} +
}
case "$1" in

View File

@@ -13,7 +13,7 @@ fsck_all() {
IGNORE_MOUNTED="-M"
fi
fsck -A -T -C${FSCK_FD} -a -t no${NETFS//,/,no},noopts=_netdev ${IGNORE_MOUNTED} -- ${FORCEFSCK}
fsck -A -T -M -C${FSCK_FD} -a -t no${NETFS//,/,no},noopts=_netdev ${IGNORE_MOUNTED} -- ${FORCEFSCK}
}
# Single-user login and/or automatic reboot after fsck (if needed)

View File

@@ -1,34 +0,0 @@
#!/bin/bash
# sourcing our current rc.conf requires this to be a bash script
. @RCLIBDIR@/functions
case "$1" in
start)
stat_busy "Mounting network filesystems"
mount -a -t "$NETFS"
rc=$?
mount -a -O _netdev
(( rc || $? )) && stat_die
add_daemon netfs
stat_done
;;
stop)
stat_busy "Unmounting network filesystems"
umount -a -f -O _netdev
rc=$?
umount -a -f -t "$NETFS"
(( rc || $? )) && stat_die
rm_daemon netfs
stat_done
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
exit 1
;;
esac