Re: rc.local not start at the boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[

angelo_dev@zorro rc.d]$ cat /tmp/syncronize.log
+ rsync -av --delete '--include=*/' '--include=*.java' '--include=*.form' '--exclude=*' /home/programmers/java/PROJECTS_development/ /media/PRTZ-src_sync


On Wed, Oct 29, 2014 at 2:09 PM, Ed Greshko <ed.greshko@xxxxxxxxxxx> wrote:
On 10/29/14 19:08, Angelo Moreschini wrote:
> Hi,
>
> I did some tests:
>
> This is the content of the file /etc/rc.d/rc.local that I used:
> ------------------------------
> #!/bin/bash
> # this is the file /ctc/rc./rc.local
>
> /etc/rc.d/dummy-test.sh
> /etc/rc.d/syncronize-java_srcs.sh
> ------------------------------
>
> I put inside it two script to be executed:
>
> /etc/rc.d/dummy-test.sh                   (to make a simple copy of a file)
> /etc/rc.d/syncronize-java_srcs.sh      (to make backups ..)
>
> -----------------------------------
> [angelo_dev@zorro rc.d]$ cat dummy-test.sh
> #!/bin/bash
> cp /home/angelo_dev/Documents/dconf-Editor.xcf /media/PRTZ-src_sync
> ---------------------------------
>
> ---------------------------------
> [angelo_dev@zorro rc.d]$ cat syncronize-java_srcs.sh
> #!/bin/bash
> # this is the file /home/angelo_dev/bin/syncronize-java_srcs.sh
>
>
> rsync -av --delete --include='*/' --include='*.java' --include='*.form' --exclude='*' \
>                             /home/programmers/java/PROJECTS_development/ \
>                             /media/PRTZ-src_sync
> ---------------------------
>
> the scripts are both in the same directory... ( the same directory than rc.local)
>
> NOW :
> doing the reboot, only the first script is executed
> NOT the second one
>
> So I have the _copy_ of the file (for test) _but not the backup.
> _
> how it can be interpreted that fact ?

The second script *IS* getting executed.  But, for some reason, it is failing.  I don't know how many times that can be repeated.

Change that script to this....

---------------------------
[egreshko@meimei ~]$ cat syncronize-java_srcs.sh
#!/bin/bash
# this is the file /home/angelo_dev/bin/syncronize-java_srcs.sh
exec 2> /tmp/syncronize.log      # send stderr from rc.local to a log file
exec 1>&2                        # send stdout to the same log file
set -x                           # tell sh to display commands before execution


rsync -av --delete --include='*/' --include='*.java' --include='*.form' --exclude='*' \
                            /home/programmers/java/PROJECTS_development/ \
                            /media/PRTZ-src_sync
--------------------------

Reboot and supply the contents of /tmp/syncronize.log


--
If you can't laugh at yourself, others will gladly oblige.

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux