Tiny Core Extensions > TCE Q&A Forum

Get a Segmentation fault trying to start StrongSwan on TCL-15.0 x86 (32-bit)

<< < (3/3)

Rich:
Hi curaga
Oh good, a separate set of error codes to deal with, thanks a lot. ;D
I think you're right. Those error codes would provide more detailed
information of the segfault.

It's too bad that rather than  stat  the file to see if it exists and print
a  "File not found"  message, they decided to segfault instead.

rhermsen:

--- Quote from: Rich on August 25, 2024, 09:53:16 AM ---Hi rhermsen
I take it that means if  /usr/local/etc/strongswan/strongswan.conf
is present, the segfault does not occur?

--- End quote ---
No, the segfault occurs independent if the config exist or not.



--- Quote from: Rich on August 25, 2024, 09:53:16 AM ---
--- Quote from: rhermsen on August 25, 2024, 05:47:18 AM --- ... Normally the startup script will copy the .sample config file without .sample if it is not already present) ...
--- End quote ---
I think the startup scripts are unique to Tinycore. They get run not
only when an extension first gets installed, but every time you boot.
This is because Tinycore does not use a persistent file system for the
operating system, but rebuilds it from scratch when it boots.

This is the startup file from TC13  usr/local/tce.installed/strongswan :

--- Code: ---for dir in /usr/local/etc/strongswan/ /usr/local/etc/strongswan/strongswan.d/ /usr/local/etc/strongswan/strongswan.d/charon/ /usr/local/etc/strongswan/swanctl/
do
        cd $dir
        for file in *.sample
        do
                if [ -r ${file%.sample} ]; then
                        echo "Verify if  $dir/${file%.sample} requires changes."
                        echo "See $dir/$file for the example."
                else
                        sudo -u tc cp $file ${file%.sample}
                fi
        done
done
--- End code ---



--- End quote ---
The script just checks if the config is already present, if it is, it will echo a messages to verify for changes.
(this is only visible if installed via cli)
If the config is not present it will copy the .sample file as config file.


--- Quote from: Rich on August 25, 2024, 09:53:16 AM ---There really should be a  #!/bin/sh  for the first line.

--- End quote ---
Thanks, I will look into that before submitting an update.


--- Quote from: Rich on August 25, 2024, 09:53:16 AM ---I don't believe this came from the strongswan source package.

--- End quote ---
Indeed I created that script.

Navigation

[0] Message Index

[*] Previous page

Go to full version