Skip to content

Commit 3e06ca2

Browse files
Delete duplicate linux lock/wipe scripts (#25611)
#22544 The Linux wipe/lock scripts have lived as duplicated in two locations for a long time. This removes the copy that isn't used. The remaining scripts in the `ee/server/service/embedded_scripts` folder are pulled in here. https://github.com/fleetdm/fleet/blob/12d8017ff905555feb0053e7a09eded404b5e8f1/ee/server/service/hosts.go#L499-L508 It looks like the `wipe` script in `scripts/mdm/linux` was even slightly out of date compared with the one in the `ee/` folder.
1 parent c4a5566 commit 3e06ca2

File tree

5 files changed

+1
-154
lines changed

5 files changed

+1
-154
lines changed

changes/22544-move-linux-lock-wipe

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Removed duplicate Linux lock and wipe scripts from repository

ee/server/service/hosts.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,6 @@ func (svc *Service) enqueueWipeHostRequest(ctx context.Context, host *fleet.Host
489489
return nil
490490
}
491491

492-
// TODO(mna): ideally we'd embed the scripts from the scripts/mdm/windows/..
493-
// and scripts/mdm/linux/.. directories where they currently exist, but this is
494-
// not possible (not a Go package) and I don't know if those script locations
495-
// are used elsewhere, so for now I just copied the contents under
496-
// embedded_scripts directory. We'll have to make sure they are kept in sync,
497-
// or better yet find a way to maintain a single copy.
498492
var (
499493
//go:embed embedded_scripts/windows_lock.ps1
500494
windowsLockScript []byte

scripts/mdm/linux/linux-lock.sh

Lines changed: 0 additions & 49 deletions
This file was deleted.

scripts/mdm/linux/linux-unlock.sh

Lines changed: 0 additions & 43 deletions
This file was deleted.

scripts/mdm/linux/linux-wipe.sh

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)