https://blue-build.org/ logo
Installing programs into /opt, creates symlink, bu...
# questions
s
I think i have quite a unique problem. I have to install Cisco Secure Client, it comes with its own install script, that installs it in ⁨`/opt/cisco/.... `⁩ I create a script module, and it installed it successful. Rebasing to the OS works fine, and I can execute it, now there is a problem. Cisco Secure Client downloads profiles, it wants to put it in ⁨`/opt/cisco/...`⁩ but since it's symlinked to ⁨`/usr/lib/opt/cisco`⁩ it can't write to it. How can i resolve this issue? Is there a different way to install programs like this?
a
message has been deleted
g
This may have to be something you install at run-time instead of build-time. Normally, ⁨`/opt`⁩ is symlinked to ⁨`/var/opt`⁩ which is completely ignored in the image since everything in ⁨`/var`⁩ is a local machine state, so we have a system at build-time that symlinks ⁨`/opt`⁩ to ⁨`/usr/lib/opt`⁩ and creates systemd tmpfile setups to symlink anything in ⁨`/usr/lib/opt`⁩ to ⁨`/var/opt`⁩ at runtime. It then sets ⁨`/opt`⁩ to symlink back to ⁨`/var/opt`⁩ at the end of each build so that ⁨`/opt`⁩ is writeable at run-time. This helps with browsers and other apps that are installed from the package manager that install into ⁨`/opt`⁩. Now at run-time, ⁨`/opt`⁩ is writable, so if the install script could be used at run-time to install the program there
s
If i understand it correctly, the user needs to install it at run-time. But this for example is a required program that needs to be installed on all systems, is there a way to execute the script at run-time then? Ignoring if a user exists or not
g
At that point, I think you would need to create a systemd unit to install it
s
Hmm, okay I will look into it. Thanks
g
Yeah dealing with ⁨`/opt`⁩ is a pain
s
I wish I could tell this piece of shit program to install somewhere else, but nooooo....
g
lol
s
Sorry ,I just hate dealing with Cisco
g
Oh I get it
I've had to deal with it at work before
s
So you somewhat get my pain 😄
g
Oh yeah
s
Oh man, that won't really work either. Since it has to install some things to folders that are read only now.
g
Oh that's gross
s
Yeeep
g
Next best thing would be to take that script and make changes to it to work for your situation
s
The only folder that has to be RW (as far as I know) is the profiles one, isn't there a way to map this differently?
Yeah I try not to, since they provide thr package
g
Maybe make that a symlink to a directory that is writeable at run-time?
s
Hmm, actually good point. I'm gonna try, thanks
2 Views