Thanks Anton for the clarification with regard to scripting ;) If i find a linux club around i will try to update my scripting abilities but at the moment i need a way to start my system!
I am still quite unsure if an upgrade via the installation medium (live usb stick) is not to brutal for me, because still i do not want to reset my whole system at this point (it took me a long time to set it up in the way i have it now ;) )
Is there a way to reinstall only the basic system settings and leaving all the other stuff (like installed packages and all my profiles and individualized stuff) untouched? Like a "system-repair" or to set back the system?
Best Benjamin
Gesendet: Mittwoch, 23. April 2014 um 14:39 Uhr
Von: "Anton Aylward"
#!/bin/sh
exec=/usr/bin/unison myprofile -batch
As a shell script I too read that as Set the environment variable named 'exec' to the value '/usr/bin/unison' and execute the program 'myprofile' Which is unlikely to be what was intended. As Benjamin said
I quite bad in scripting
Yes but that's well documented in the manuals on shell scripting. There are few if any reasons to use the shell 'exec' functions in normal programming. Not least of all that it doesn't return control in the same way as simply running what would be the argument to 'exec'.
But I did think that this would ruin my system that much…
Oh? Why ever not? You created a script that interfered with the booting of the system and as you admit you are ignorant of some essential basics of shell programming. I realise that some people here defend sysvinit on the basis that its all about shell script and they are 'more intelligible' and shell programming is easy to understand. But honestly, the way systemd works I think that it would not have hung the system. The real problem with sysvinit is that it is sequential, it relies on each script behaving well and completing before going on to the next one. By comparison, there is less to a systemd unit file and if the syntax is wrong then its discarded. By comparison a unit file for this might read [Unit] Description=Unison to synchronise [Service] ExecStart=/usr/bin/unison /path/to/myprofile -batch [Install] WantedBy=multi-user.target which is a simple 'copy+edit' of an existing unit file such as the one for CUPS. I know from my own experience that an error in a unit file just gets it rejected. If Benjamin had been using a systemd approach rather than a sysvinit approach then he might not have achieved what he wanted right away, I certainly didn't when trying this the first few times (despite what John says, I'm not perfect) but it didn't hang or crash my system and the error messages were useful enough that I could rapidly converge on a correction. To my mind, a system that is so fragile that a simple syntax error in a script -- which is essentially what the "=" instead of a ' ' amounts to -- is worrisome. -- E pluribus unum. (Out of many, one.) - Motto for the Seal of the United States. Adopted 20 June 1782, recommended by John Adams, Benjamin Franklin and Thomas Jefferson, 10 Aug. 1776, and proposed by Swiss artist Pierre Eugene du SimitiËre. It had originally appeared on the title page of the Gentleman's Journal (Jan. 1692). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org