fcron: use systab, use fcron user
I take the opportunity of the CRUX 2.5 release change to do two long standing adjustments: * use a determinded user fcron * use systab instead of root for system crontab
This commit is contained in:
parent
c01c0cea5b
commit
3417cac635
@ -1,15 +1,15 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/fcron/
|
||||
-rw-r----- root/daemon etc/fcron/fcron.allow
|
||||
-rw-r----- root/daemon etc/fcron/fcron.conf
|
||||
-rw-r----- root/daemon etc/fcron/fcron.deny
|
||||
-rw-r----- root/fcron etc/fcron/fcron.allow
|
||||
-rw-r----- root/fcron etc/fcron/fcron.conf
|
||||
-rw-r----- root/fcron etc/fcron/fcron.deny
|
||||
drwxr-xr-x root/root etc/rc.d/
|
||||
-rwxr-xr-x root/root etc/rc.d/fcron
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
---s--s--x daemon/daemon usr/bin/fcrondyn
|
||||
---s--x--- root/daemon usr/bin/fcronsighup
|
||||
---s--s--x daemon/daemon usr/bin/fcrontab
|
||||
---s--s--x fcron/fcron usr/bin/fcrondyn
|
||||
---s--x--- root/fcron usr/bin/fcronsighup
|
||||
---s--s--x fcron/fcron usr/bin/fcrontab
|
||||
drwxr-xr-x root/root usr/man/
|
||||
drwxr-xr-x root/root usr/man/man1/
|
||||
-rw-r--r-- root/root usr/man/man1/fcrondyn.1.gz
|
||||
@ -23,5 +23,5 @@ drwxr-xr-x root/root usr/sbin/
|
||||
---x--x--- root/root usr/sbin/fcron
|
||||
drwxr-xr-x root/root var/
|
||||
drwxr-xr-x root/root var/spool/
|
||||
drwxrwx--- daemon/daemon var/spool/fcron/
|
||||
-rw------- root/root var/spool/fcron/root.orig
|
||||
drwxrwx--- fcron/fcron var/spool/fcron/
|
||||
-rw------- root/root var/spool/fcron/systab.orig
|
||||
|
@ -1,3 +1,3 @@
|
||||
646ff958524a01da4069b33c5b48b52a fcron
|
||||
e11816b7a028e356626e4ccc359b0c95 fcron
|
||||
5a26a1dfd91fdc7e87401e98aef870e6 fcron-3.0.4.src.tar.gz
|
||||
39072065ed7a9ea70bc40308f622ebcf root.orig
|
||||
0153ce1b5ac57ab970abafbde26a9b62 systab.orig
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
name=fcron
|
||||
version=3.0.4
|
||||
release=1
|
||||
release=2
|
||||
source=(http://fcron.free.fr/archives/$name-$version.src.tar.gz \
|
||||
fcron root.orig)
|
||||
fcron systab.orig)
|
||||
|
||||
build () {
|
||||
cd $name-$version
|
||||
@ -17,8 +17,8 @@ build () {
|
||||
--mandir=/usr/man \
|
||||
--with-spooldir=/var/spool/fcron \
|
||||
--with-boot-install=no \
|
||||
--with-username=daemon \
|
||||
--with-groupname=daemon \
|
||||
--with-username=fcron \
|
||||
--with-groupname=fcron \
|
||||
--with-pam=no \
|
||||
--with-sendmail=/usr/sbin/sendmail
|
||||
|
||||
@ -28,5 +28,5 @@ build () {
|
||||
rm -r $PKG/{usr/{share,man/{fr,man3}},var/run}
|
||||
|
||||
install -D -m 755 $SRC/fcron $PKG/etc/rc.d/fcron
|
||||
install -m 600 $SRC/root.orig $PKG/var/spool/fcron
|
||||
install -m 600 $SRC/systab.orig $PKG/var/spool/fcron
|
||||
}
|
||||
|
19
fcron/README
Normal file
19
fcron/README
Normal file
@ -0,0 +1,19 @@
|
||||
README for fcron 3.x
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
PRE/POST-INSTALL
|
||||
|
||||
1. Create a user/group fcron with a unused id < 99:
|
||||
|
||||
'groupadd -g 45 fcron'
|
||||
'useradd -u 45 -g fcron -d /var/spool/fcron -s /bin/false fcron'
|
||||
'passwd -l fcron'
|
||||
|
||||
PRECAUTION
|
||||
|
||||
As of version 3.0.4 release 2 frcon is configured to use a
|
||||
user and group fcron instead of daemon/daemon.
|
||||
If you upgrade fcron you have to run rejmerge to get the right
|
||||
owner for the files in /etc/fcron and manually adjust the owner
|
||||
and group of /var/spool/fcron to fcron.
|
@ -6,8 +6,8 @@
|
||||
case $1 in
|
||||
start)
|
||||
/usr/sbin/fcron -b
|
||||
if [ ! -f /var/spool/fcron/root ]; then
|
||||
/usr/bin/fcrontab -u root -z
|
||||
if [ ! -f /var/spool/fcron/systab ]; then
|
||||
/usr/bin/fcrontab -u systab -z
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
|
6
fcron/pre-install
Normal file
6
fcron/pre-install
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
getent group fcron || /usr/sbin/groupadd -g 45 fcron
|
||||
getent passwd fcron || /usr/sbin/useradd -g fcron -u 45 -d /var/spool/fcron -s /bin/false fcron
|
||||
/usr/bin/passwd -l fcron
|
||||
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# /var/spool/fcron/root.org: fcron(8) configuration
|
||||
# /var/spool/fcron/systab.org: fcron(8) configuration
|
||||
#
|
||||
|
||||
!mailto(root)
|
||||
!noticenotrun(yes)
|
||||
|
||||
|
||||
%hourly * /usr/sbin/runjobs /etc/cron/hourly
|
||||
%daily * * /usr/sbin/runjobs /etc/cron/daily
|
||||
%weekly * * /usr/sbin/runjobs /etc/cron/weekly
|
||||
%monthly * * * /usr/sbin/runjobs /etc/cron/monthly
|
Loading…
x
Reference in New Issue
Block a user