Portability: Use $SOCKETDIR variable instead of hardcoded references to /var/run/screen?

Bug #535378 reported by ermo | Rune Morling
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Low
Dustin Kirkland 

Bug Description

Dustin,

For Foresight Linux, I need to patch the below three files with a different socketdir as our screen package saves sessions in /tmp/uscreens/ instead of /var/run/screen.

<ermo@mrwing>:[~/conary/builds/byobu/byobu-2.62]
(92)$ grep /var/run/screen usr/bin/*
usr/bin/byobu-config:RELOAD_FLAG="/var/run/screen/S-"+USER+"/"+PKG+".reload-required"
usr/bin/byobu-janitor:RUN="/var/run/screen/S-$USER"
usr/bin/byobu-select-profile: touch "/var/run/screen/S-$USER/$PKG.reload-required"

How about creating a /usr/share/byobu/socketdir file, which simply contains "SOCKETDIR=/var/run/screen" and source it in the above three scripts and replace the hardcoded strings?

That way, packagers only need to change SOCKETDIR in one place.

I've also noticed that usr/bin/byobu-config contains a hardcoded reference to /bin/bash, which is probably not good for portability to e.g. FreeBSD and which should probably also be mentioned as a package dependency (couldn't find any mention of it in the release tarball)?

Related branches

description: updated
Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 535378] [NEW] Portability: Use $SOCKETDIR variable instead of hardcoded references to /var/run/screen?

I agree in principle with the suggestion, though I think
/etc/byobu/socketdir would be more appropriate, no?

How about /etc/byobu/socketdir instead, such that sysadmins (in
addition to packagers) could tweak this?

Regarding the bash reference, sure ... please open a different bug for that ;-)

Revision history for this message
ermo | Rune Morling (ermo) wrote :

/etc/byobu/socketdir sounds like a better idea, yes.

Changed in byobu:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.