Run a script on first boot after install in 16.04

Tom H tomh0665 at gmail.com
Fri Jul 22 13:52:45 UTC 2016


On Fri, Jul 22, 2016 at 7:15 AM, Liam Proven <lproven at gmail.com> wrote:
> On 22 July 2016 at 09:59, Josef Wolf <jw at raven.inka.de> wrote:
>>
>> I have to come back to this topic again:
>>
>> My postinstall-script that is started on first bootup starts a screen session.
>
> Wow, you *really* like to make life difficult for yourself! :-o
>
>> This way, it can prompt me to query for additional information, and I am able
>> to to start new shell sessions for investigating any problems that can come
>> up.
>>
>> unfortunatley, while waiting for my script to finish (that can last some
>> hours!), systemd outputs a message telling me that it is waiting for it to
>> finish. It repeats this message multiple times per second to show a red dot
>> moving from left to right and back again. This output destroys all the output
>> in my screen session and I can't seen any prompt (it is immedeately
>> overwritten). I can't even see what I am typing when I start a new shell in
>> screen by CTRL-A CTRL-C!
>>
>> This output is thrown at whatever termial I switch, so switching terminals
>> won't help.
>>
>> Why won't this output stay on virtual console 1? How can I disable it?
>
> Systemd does not play nice with ``screen'' and similar tools.
>
> https://news.ycombinator.com/item?id=11782364
>
> https://www.reddit.com/r/programming/comments/4ldewx/systemd_kills_screen_and_tmux_by_default_on_logout/

Let's be serious. It's a pretty bizarre solution to deal with
badly-behaving apps but:

1) This was done in systemd v230 upstream and 16.04 has v229.

2) The Debian and Ubuntu systemd maintainers are patching out this
change (at least, for the time being).


> You might be better off investigating something like Devuan -- Debian
> without systemd:
>
> http://www.theregister.co.uk/2016/04/29/systemd_free_debian_fork_devuan_reaches_beta/

Devuan's stuck in permanent beta status because rather than simply
rebuild packages without linking to libsystemd, the way the Debian
developer who runs angband.pl has done, it's creating a complex
infrastructure backend that could've waited for its next release (I'm
not saying that their tooling, like amprolla, is bad, only that it's
proof of the "perfect is the enemy of the good" adage). Also, IIUC,
some Debian packages are being changed with non-systemd changes too,
adding to the delta and to the development time.

If you want to use a systemd-less distro with deb/apt, Debian's the
only option, perhaps with a side-grade to Devuan in the future. But
this seems like a radical change simply to be able to run a script at
first boot!




More information about the ubuntu-users mailing list