3 # See ../cron/README and ../screen/README
5 if [ "$(id -u)" -ne 0 ]; then
6 echo "ERROR: Must be run as root"
15 FILES
="$FILES fixupd/README fixupd/fixup.sh fixupd/fixupd.sh"
16 FILES
="$FILES toolbox/run-fixupd.sh screen/root"
19 CPFLAGS
=--preserve=timestamps
21 echo "*** Checking for source files ($basedir)..."
24 if [ ! -r "$basedir/$sf" ]; then
26 echo "ERROR: Missing source file $basedir/$sf"
29 if [ -n "$bad" ]; then
30 echo "ERROR: Some source files missing, cannot copy"
34 echo "*** Setting up root scripts (~root/repomgr)..."
35 mkdir
-p ~root
/repomgr
/fixupd ~root
/repomgr
/toolbox ~root
/repomgr
/screen
36 chown
-R 0:0 ~root
/repomgr
37 chmod -R u
+w
,go-w ~root
/repomgr
39 cp $CPFLAGS "$basedir/$sf" ~root
/repomgr
/$sf.new
41 chown
-R 0:0 ~root
/repomgr
42 chmod -R u
+w
,go-w ~root
/repomgr
44 mv -f ~root
/repomgr
/$sf.new ~root
/repomgr
/$sf
46 echo "--- ~root/repomgr created/updated"
47 echo "--- Restart the fixupd.sh script if needed"
48 echo "--- Add $basedir/crontab/girocco to /etc/cron.d/"