@@ -756,48 +756,6 @@ public void requiresFeature(String feature, Version from, Version until) {
756
756
featureFlags .add (new FeatureFlag (feature , from , until ));
757
757
}
758
758
759
- private boolean isUbuntu2404OrLater () {
760
- try {
761
- if (OS .current () != OS .LINUX ) {
762
- return false ;
763
- }
764
-
765
- // Read /etc/os-release file to get distribution info
766
- Path osRelease = Path .of ("/etc/os-release" );
767
- if (!Files .exists (osRelease )) {
768
- return false ;
769
- }
770
-
771
- String content = Files .readString (osRelease );
772
- boolean isUbuntu = content .contains ("ID=ubuntu" );
773
-
774
- if (!isUbuntu ) {
775
- return false ;
776
- }
777
-
778
- // Extract version
779
- String versionLine = content .lines ().filter (line -> line .startsWith ("VERSION_ID=" )).findFirst ().orElse ("" );
780
-
781
- if (versionLine .isEmpty ()) {
782
- return false ;
783
- }
784
-
785
- String version = versionLine .substring ("VERSION_ID=" .length ()).replace ("\" " , "" );
786
- String [] parts = version .split ("\\ ." );
787
-
788
- if (parts .length >= 2 ) {
789
- int major = Integer .parseInt (parts [0 ]);
790
- int minor = Integer .parseInt (parts [1 ]);
791
- return major > 24 || (major == 24 && minor >= 4 );
792
- }
793
-
794
- return false ;
795
- } catch (Exception e ) {
796
- LOGGER .debug ("Failed to detect Ubuntu version" , e );
797
- return false ;
798
- }
799
- }
800
-
801
759
private void runElasticsearchBinScriptWithInput (String input , String tool , CharSequence ... args ) {
802
760
if (Files .exists (getDistroDir ().resolve ("bin" ).resolve (tool )) == false
803
761
&& Files .exists (getDistroDir ().resolve ("bin" ).resolve (tool + ".bat" )) == false ) {
0 commit comments