@@ -65,19 +65,25 @@ function get_distname() {
6565 if (file_exists ('/etc/debian_version ' )) {
6666
6767 if (trim (file_get_contents ('/etc/debian_version ' )) == '4.0 ' ) {
68- $ distname = 'debian40 ' ;
68+ $ distname = 'Debian ' ;
69+ $ distver = '4.0 ' ;
70+ $ distid = 'debian40 ' ;
6971 swriteln ("Operating System: Debian 4.0 or compatible \n" );
7072 }
7173 if (trim (file_get_contents ('/etc/debian_version ' )) == 'lenny/sid ' ) {
72- $ distname = 'debian40 ' ;
74+ $ distname = 'Debian ' ;
75+ $ distver = 'Lenny/Sid ' ;
76+ $ distid = 'debian40 ' ;
7377 swriteln ("Operating System: Debian Lenny/Sid or compatible \n" );
7478 }
7579 }
7680
7781 //** OpenSuSE
7882 elseif (file_exists ("/etc/SuSE-release " )) {
7983 if (stristr (file_get_contents ('/etc/SuSE-release ' ),'11.0 ' )) {
80- $ distname = 'opensuse110 ' ;
84+ $ distname = 'openSUSE ' ;
85+ $ distver = '11.0 ' ;
86+ $ distid = 'opensuse110 ' ;
8187 swriteln ("Operating System: openSUSE 11.0 or compatible \n" );
8288 }
8389 }
@@ -89,7 +95,9 @@ function get_distname() {
8995 $ content = file_get_contents ('/etc/redhat-release ' );
9096
9197 if (stristr ($ content ,'Fedora release 9 (Sulphur) ' )) {
92- $ distname = 'fedora9 ' ;
98+ $ distname = 'Fedora ' ;
99+ $ distver = '9 ' ;
100+ $ distid = 'fedora9 ' ;
93101 swriteln ("Operating System: Fedora 9 or compatible \n" );
94102 }
95103
@@ -98,7 +106,7 @@ function get_distname() {
98106 die ('unrecognized linux distribution ' );
99107 }
100108
101- return $ distname ;
109+ return array ( ' name ' => $ distname, ' version ' => $ distver , ' id ' => $ distid ) ;
102110}
103111
104112function sread () {
0 commit comments