fix: replace hardcoded paths for satellite
This commit is contained in:
parent
a4ac280350
commit
235d853f42
2 changed files with 3 additions and 3 deletions
|
|
@ -477,7 +477,7 @@ const getImageRequests = (state: RootState): ImageRequest[] => {
|
|||
|
||||
const getSatelliteCommand = (files?: File[]): string => {
|
||||
const satelliteCommandFile = files?.find(
|
||||
(file) => file.path === '/usr/local/sbin/register-satellite'
|
||||
(file) => file.path === SATELLITE_PATH
|
||||
);
|
||||
return satelliteCommandFile?.data ? atob(satelliteCommandFile.data) : '';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ export const FIRST_BOOT_SERVICE = 'custom-first-boot';
|
|||
|
||||
export const SATELLITE_SERVICE_DATA = btoa(`[Unit]
|
||||
Description=Register satellite first boot script
|
||||
ConditionFileIsExecutable=/usr/local/sbin/register-satellite
|
||||
ConditionFileIsExecutable=${SATELLITE_PATH}
|
||||
ConditionPathExists=!/var/local/.register-satellite-done
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
|
@ -286,7 +286,7 @@ After=osbuild-first-boot.service
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash -x /usr/local/sbin/register-satellite
|
||||
ExecStart=/bin/bash -x ${SATELLITE_PATH}
|
||||
ExecStartPost=/usr/bin/touch /var/local/.register-satellite-done
|
||||
RemainAfterExit=yes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue