src/cmd/udev.js
function udevRulesInstalled() {
	if (_udevRulesInstalled !== undefined) {
		return _udevRulesInstalled;
	}
	if (!systemSupportsUdev()) {
		_udevRulesInstalled = false;
		return false;
	}
	// Try to load the installed rules file
	let current = null;
	try {
		current = fs.readFileSync(UDEV_RULES_SYSTEM_FILE);
	} catch (e) {
		_udevRulesInstalled = false;
		return false;
	}
	// Compare the installed file with the file bundled with this app
	const latest = fs.readFileSync(UDEV_RULES_ASSET_FILE);
	_udevRulesInstalled = current.equals(latest);
	return _udevRulesInstalled;
}
function udevRulesInstalled() {
	if (_udevRulesInstalled !== undefined) {
		return _udevRulesInstalled;
	}
	if (!systemSupportsUdev()) {
		_udevRulesInstalled = false;
		return false;
	}
	// Try to load the installed rules file
	let current = null;
	try {
		current = fs.readFileSync(UDEV_RULES_SYSTEM_FILE);
	} catch (e) {
		_udevRulesInstalled = false;
		return false;
	}
	// Compare the installed file with the file bundled with this app
	const latest = fs.readFileSync(UDEV_RULES_ASSET_FILE);
	_udevRulesInstalled = current.equals(latest);
	return _udevRulesInstalled;
}
function udevRulesInstalled ( ) { if ( _udevRulesInstalled !== undefined ) { return _udevRulesInstalled ; } if ( ! systemSupportsUdev ( ) ) { _udevRulesInstalled = false ; return false ; } // Try to load the installed rules file let current = null ; try { current = fs . readFileSync ( UDEV_RULES_SYSTEM_FILE ) ; } catch ( e ) { _udevRulesInstalled = false ; return false ; } // Compare the installed file with the file bundled with this app const latest = fs . readFileSync ( UDEV_RULES_ASSET_FILE ) ; _udevRulesInstalled = current . equals ( latest ) ; return _udevRulesInstalled ; }
Check if the system has the latest udev rules installed.

@return {Boolean}
Check if the system has the latest udev rules installed .