Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
33cea83d1b | |||
79bccd989e | |||
6d2a516b64 | |||
|
87de61f78c |
4
rc.conf
4
rc.conf
@@ -9,8 +9,8 @@ cfg_hostname='changeme'
|
|||||||
#cfg_timezone='Europe/Moscow'
|
#cfg_timezone='Europe/Moscow'
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
cfg_services+=( 'fsck' 'mount' 'systemd-udevd' 'sysctl' ) # Services that need tp be started in an order
|
cfg_services+=( 'fsck' 'mount' 'sysctl' 'rsyslogd' ) # Services that need tp be started in an order
|
||||||
cfg_services+=( '@lo.iface' ) # These start in parallel.
|
cfg_services+=( '@lo.iface' '@scron' '@sshd' ) # These start in parallel.
|
||||||
cfg_services+=( @agetty-tty{2..6} ) # Comment this if your init starts something on the ttys itself.
|
cfg_services+=( @agetty-tty{2..6} ) # Comment this if your init starts something on the ttys itself.
|
||||||
cfg_services+=( 'rc.local' ) # Traditionally, rc.local starts last. Technically here it doesn't. Not quite :)
|
cfg_services+=( 'rc.local' ) # Traditionally, rc.local starts last. Technically here it doesn't. Not quite :)
|
||||||
|
|
||||||
|
14
rc.in
14
rc.in
@@ -31,13 +31,14 @@ rc.motd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rc.tmpfiles() {
|
rc.tmpfiles() {
|
||||||
printf '%s\n' "${cfg_tmpdirs[@]}" | while IFS=':' read dir perm; do
|
printf '%s\n' "${cfg_tmpdirs[@]}" | while IFS=':' read dir perm own grp; do
|
||||||
mkdir -v -m "${perm:-755}" "$dir"
|
install -v -d -m "${perm:-755}" -o "${own:-root}" -g "${grp:-root}" "$dir" 2>/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
printf '%s\n' "${cfg_tmpfiles[@]}" | while IFS=':' read file perm; do
|
printf '%s\n' "${cfg_tmpfiles[@]}" | while IFS=':' read file perm own grp; do
|
||||||
> "$file"
|
> "$file"
|
||||||
chmod -v "${perm:-644}" "$file"
|
chmod -c "${perm:-644}" "$file"
|
||||||
|
chown -c "${own:-root}:${grp:-root}" "$file"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,9 +142,14 @@ rc.halt() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rc.sync() {
|
||||||
|
echo "Syncing disks."
|
||||||
|
}
|
||||||
|
|
||||||
rc.shutdown() {
|
rc.shutdown() {
|
||||||
rc.services_stop
|
rc.services_stop
|
||||||
rc.stop_everything
|
rc.stop_everything
|
||||||
|
rc.sync
|
||||||
rc.unmount_everything
|
rc.unmount_everything
|
||||||
rc.remount_root
|
rc.remount_root
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user