2008-10-30 Dan Williams <dcbw@redhat.com>

* src/ppp-manager/nm-ppp-manager.c
		- (nm_ppp_manager_start): if /dev/ppp doesn't exist, load the
			ppp_generic module to create it (bgo #533064)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4235 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-10-30 05:20:53 +00:00
parent b955a8197e
commit cbd88c9482
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2008-10-30 Dan Williams <dcbw@redhat.com>
* src/ppp-manager/nm-ppp-manager.c
- (nm_ppp_manager_start): if /dev/ppp doesn't exist, load the
ppp_generic module to create it (bgo #533064)
2008-10-30 Dan Williams <dcbw@redhat.com> 2008-10-30 Dan Williams <dcbw@redhat.com>
Patch from Alexander Sack <asac@canonical.com> Patch from Alexander Sack <asac@canonical.com>

View file

@ -13,6 +13,7 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <asm/types.h> #include <asm/types.h>
#include <net/if.h> #include <net/if.h>
#include <sys/stat.h>
#include <linux/ppp_defs.h> #include <linux/ppp_defs.h>
#ifndef aligned_u64 #ifndef aligned_u64
@ -873,10 +874,15 @@ nm_ppp_manager_start (NMPPPManager *manager,
NMSettingPPPOE *pppoe_setting; NMSettingPPPOE *pppoe_setting;
NMCmdLine *ppp_cmd; NMCmdLine *ppp_cmd;
char *cmd_str; char *cmd_str;
struct stat st;
g_return_val_if_fail (NM_IS_PPP_MANAGER (manager), FALSE); g_return_val_if_fail (NM_IS_PPP_MANAGER (manager), FALSE);
g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE); g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
/* Make sure /dev/ppp exists (bgo #533064) */
if (stat ("/dev/ppp", &st) || !S_ISCHR (st.st_mode))
system ("/sbin/modprobe ppp_generic");
connection = nm_act_request_get_connection (req); connection = nm_act_request_get_connection (req);
ppp_setting = NM_SETTING_PPP (nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP)); ppp_setting = NM_SETTING_PPP (nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP));
g_return_val_if_fail (ppp_setting != NULL, FALSE); g_return_val_if_fail (ppp_setting != NULL, FALSE);