LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[Bug]: 7DTD - copying config file [ serverconfig.xml ]: cp: option '--update' doesn't allow an argument

Open Scott-GMI opened this issue 1 year ago • 2 comments

User story

Installing a 7DTD server the script gave error when copying the serverconfig.xml file - issue with cp command.

Game

7 Days to Die

Linux distro

RedHat 9, Other

Command

command: install

Further information

Using Rocky Linux 9

Relevant log output

Success! App '294420' fully installed.
Complete! Installing sdtdserver: SteamCMD

=================================
Was the install successful? [Y/n] Y
fetching GitHub check_gamedig.sh...OK
fetching GitHub install_config.sh...OK

Copying 7 Days To Die Configs
=================================
Copying default configs.
copying config file [ serverconfig.xml ]: cp: option '--update' doesn't allow an argument
Try 'cp --help' for more information.
FAIL
Config Locations
=================================
Config file: /home/sdtdserver/serverfiles/sdtdserver.xml (FILE MISSING)
LinuxGSM Config: /home/sdtdserver/lgsm/config-lgsm/sdtdserver
Documentation: https://docs.linuxgsm.com/configuration/game-server-config
fetching GitHub fix.sh...OK
fetching GitHub install_stats.sh...OK

LinuxGSM Stats
=================================
Assist LinuxGSM development by sending anonymous stats to developers.
Collected data is publicly available: https://linuxgsm.com/data/usage
More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats
The following info will be sent:
* game server
* distro
* game server resource usage
* server hardware info
Allow anonymous usage statistics? [Y/n] Y
Information! Stats setting is now enabled in common.cfg.
fetching GitHub install_complete.sh...OK

=================================
Install Complete!

To start server type:
./sdtdserver start

fetching GitHub core_exit.sh...OK
[sdtdserver@localhost ~]$

Steps to reproduce

Tried the install twice - same error both times.

Scott-GMI avatar Nov 22 '24 03:11 Scott-GMI

Hello, same issue on Debian Bookworm:

The issue came from the install_config.sh fil at line 72:

lgsm/modules/install_config.sh: cp --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}"
cp --update=none"

The --update param doesn't allow any args, to fix that i removed it from the file:

lgsm/modules/install_config.sh: cp "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}"

Then relaunch the ./sdtdserver install and voila:

Copying 7 Days To Die Configs
=================================
Copying default configs.
copying config file [ serverconfig.xml ]: OK

Tabazutt avatar Dec 21 '24 10:12 Tabazutt

Same issue on Debian 12 Bookworm:

fetching GitHub install_config.sh...OK

Copying 7 Days To Die Configs
=================================
Copying default configs.
copying config file [ serverconfig.xml ]: cp: option '--update' doesn't allow an argument
Try 'cp --help' for more information.
FAIL
Config Locations
=================================
Config file: /home/sdtdserver/serverfiles/sdtdserver.xml (FILE MISSING)
LinuxGSM Config: /home/sdtdserver/lgsm/config-lgsm/sdtdserver
Documentation: https://docs.linuxgsm.com/configuration/game-server-config
fetching GitHub fix.sh...OK
fetching GitHub install_stats.sh...OK

Tabazutt's suggestion above resolved it.

Thanks

fuzzypenguins avatar Jan 20 '25 07:01 fuzzypenguins

So if I remember correctly there is a bit of a problem with now Debian choose to use cp. I think there was some disagreements between developers etc on a much higher level. This means that teh behaviour of cp is different on debian to other distros now. Very annoying.

dgibbs64 avatar Jun 21 '25 20:06 dgibbs64

I hit the same issue on Ubuntu 22.04 cp (GNU coreutils) 8.32

I resolved for myself by changing lgsm/modules/install_config.sh: cp --update=none "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" to lgsm/modules/install_config.sh: cp --no-clobber "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}"

Optional flags for update seem to have been added in coreutils version 9.3 Ubuntu 24.04 ships with coreutils version 9.4 and doesn't have this issue.

reggiekage avatar Jun 22 '25 14:06 reggiekage