View | Details | Raw Unified | Return to bug 24987
Collapse All | Expand All

(-)a/login-utils/agetty.c (+23 lines)
Lines 956-961 do_prompt(op, tp) Link Here
956
		        printf ((users == 1) ? _("user") : _("users"));
956
		        printf ((users == 1) ? _("user") : _("users"));
957
		      break;
957
		      break;
958
		    }
958
		    }
959
		    case 'R':
960
		      {
961
		        FILE *fp = fopen ("/etc/altlinux-release", "r");
962
		        if (fp)
963
		        {
964
				char rel[1024];
965
				if (fgets(rel, sizeof rel, fp))
966
				{
967
					unsigned len;
968
					for (len = strlen (rel); len > 0; --len)
969
					{
970
						if (rel[len-1] == '\n' || rel[len-1] == '\r')
971
							rel[len-1] = '\0';
972
						else
973
							break;
974
					}
975
					if (len > 0)
976
						printf ("%s", rel);
977
				}
978
				fclose (fp);
979
			}
980
			break;
981
		      }
959
		  default:
982
		  default:
960
		    (void) putchar(c);
983
		    (void) putchar(c);
961
		  }
984
		  }

Return to bug 24987